Skip to content

Instantly share code, notes, and snippets.

@vhsu
vhsu / page.google-product-feed.liquid
Last active March 20, 2025 23:19 — forked from cameroncowden/page.google-product-feed.liquid
Shopify Google Product Feed xml generator
{% comment %}
Instructions:
- Create a blank page called 'Google Base Product Feed'and save it
- Open that page for editing and select 'page.google-feed' from the page template selector
- Add a brief site description to the meta-shop-description snippet
- The feed url should now be available at http://www.yoursite.com/pages/google-base-product-feed
- validate your field at http://validator.w3.org/feed/
- when ready, submit your feed at http://base.google.com
@vhsu
vhsu / gist:ea1e832262265b93d87528819caa1062
Last active May 25, 2018 12:41 — forked from alisterlf/gist:3490957
JAVASCRIPT:Remove Accents
//Lowercase Only Version
function RemoveAccents(strAccents) {
var strAccents = strAccents.split('');
var strAccentsOut = new Array();
var strAccentsLen = strAccents.length;
var accents = 'àáâãäåòóôõöøèéêëðçÐìíîïùúûüñšÿýž';
var accentsOut = "aaaaaaooooooeeeeecdiiiiuuuunsyyz";
for (var y = 0; y < strAccentsLen; y++) {
if (accents.indexOf(strAccents[y]) != -1) {
strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1);
@vhsu
vhsu / gist:08c586c3621f486dd88a
Last active January 5, 2016 19:56 — forked from russorat/gist:7446125
AdWords Script to check sitelinks
function main() {
Logger.log('AdWordsApp.extensions().sitelinks() list.');
logSitelinks(AdWordsApp);
Logger.log('Campaign and AdGroup list.');
var campIter = AdWordsApp.campaigns().get();
while(campIter.hasNext()) {
var camp = campIter.next();
logSitelinks(camp);
var agIter = camp.adGroups().get();