Skip to content

Instantly share code, notes, and snippets.

View oksushi's full-sized avatar

Cal Wilson oksushi

View GitHub Profile
@dominikwilkowski
dominikwilkowski / show-sizes.liquid
Last active August 29, 2015 14:01
Convert variant dropdown into swatches, one-option-sollution
{% comment %}
This snippet displays sizes
Usage:
{% include 'show-sizes' with product %}
Return:
no return
Required:
<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>
@atkinson
atkinson / gist:7999356
Created December 17, 2013 03:07
Easy jQuery templating
/*
Author: Rich Atkinson hello@piran.com.au
*/
// Provides a String.render() method. Similar to String.format() (in c),
// except it takes a literal object of name / value pairs, like context in Django.
// eg: "Hello {name} welcome to {list}".format({name: 'Joe', list: 'Spam'})
if (!String.prototype.render) {
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 30, 2024 08:12
A badass list of frontend development resources I collected over time.
@willurd
willurd / web-servers.md
Last active May 30, 2024 02:54
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@hayageek
hayageek / Google URL Shortener API
Last active May 21, 2019 11:57
Google URL Shortener API Javascript Example
<html>
<head>
</head>
<script type="text/javascript">
function makeShort()
{
var longUrl=document.getElementById("longurl").value;
var request = gapi.client.urlshortener.url.insert({
'resource': {
'longUrl': longUrl
@antonjb
antonjb / layers_export.jsx
Created December 10, 2012 06:47
Illustrator Layer to SVG Exporter
/*
* Layers to SVG - layers_export.jsx
* @version 0.1
* Improved PageItem selection, which fixed centering
*
* @author Anton Ball
* Exports all layers to SVG Files
* I didn't want every layer in the SVG file so it first creates a new document
* and one by one copies each layer to that new document while exporting it out
* as an SVG.
@jonathantneal
jonathantneal / README.md
Created November 8, 2012 09:33
Accessible Breadcrumbs Markup

Accessible Breadcrumbs Markup

Screen Readers

On MacOS X Mountain Lion, VoiceOver 6 reads "Breadcrumbs with 3 items, navigation. Link, Home. Link, Library. Visited link, Data."

On Windows XP, Windows Eyes 7.5.4.1 reads "Two links. Link, Home. Link, Library. Visited Link, Data."

On Windows XP, NVDA 2012.3 reads "Navigation landmark. Link, Home. Link, Library. Visited Link, Data."

@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@unbracketed
unbracketed / export_repo_issues_to_csv.py
Last active August 3, 2023 18:13
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests