Skip to content

Instantly share code, notes, and snippets.

View tejasshah93's full-sized avatar
:octocat:

Tejas Shah tejasshah93

:octocat:
View GitHub Profile
@cameroncowden
cameroncowden / page.google-product-feed.liquid
Created August 15, 2018 15:34
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
<div>
<label for="sort-by">Sort by</label>
<select id="sort-by">
<option value="manual">Featured</option>
<option value="price-ascending">Price: Low to High</option>
<option value="price-descending">Price: High to Low</option>
<option value="title-ascending">A-Z</option>
<option value="title-descending">Z-A</option>
<option value="created-ascending">Oldest to Newest</option>
<option value="created-descending">Newest to Oldest</option>
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 22, 2024 01:47
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

function map (arr, func) {
return Promise.resolve().then(function () {
return arr.map(function (el) { return func(el) })
}).all()
}
function mapSeries (arr, func) {
let currentPromise = Promise.resolve()
let promises = arr.map(function (el) {
return currentPromise = currentPromise.then(function () {
@jimothyGator
jimothyGator / README.md
Last active April 25, 2024 18:00
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@rodrigosetti
rodrigosetti / remove-unused-imports.py
Created February 7, 2013 21:49
Removes unused imports from a bunch of Java files.
#! /usr/bin/env python
# coding: utf-8
"""This script reads all .java files from a directory tree and removes unused
import statements. It may have errors in detecting import lines (e.g. import
lines within block comments, or import lines with another statement in the same
line), and it may have false-negatives when deciding to remove an import (i.e.
it only removes if the last import symbol word doesn't appear at all -
including comments - in the code).