Skip to content

Instantly share code, notes, and snippets.

jkeck / svg-pie-chart.css
Created Nov 14, 2015
Simple SVG Pie Chart
View svg-pie-chart.css
svg {
width: 100px;
border-radius: 50%;
transform: rotate(-90deg);
circle {
fill: none;
stroke-width: 32;
james-Ballyhoo / critcss.snippet.js
Created Sep 18, 2015
Based off of , but with support for media queries and dumps css to a textarea in a panel stuck to the top of the page. Only tested in Chrome, uses height of window to determine "critical path".
View critcss.snippet.js
var container = document.createElement("div"); = "_CRIT_CSS";
container.innerHTML = '<textarea cols=80 rows=20></textarea><button id="CRIT_FIND">Find Critical CSS</button><button id="CRIT_CLOSE">Exit</button>'; = "fixed"; = 0; = 0; = 0; = "#FFF";
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
NodeList.prototype.__proto__ = Array.prototype;
t2 / birthday_liker.rb
Last active Sep 23, 2016
Like and Comment on every 'Happy Birthday' post on your Facebook feed at once.
View birthday_liker.rb
require 'date'
require 'koala'
class BirthdayLiker
FACEBOOK_TOKEN = 'your_oauth_key'
BIRTHDAY_WORDS = %w(birthday bday birfday birth born)
THANKS_OPTIONS = ['Thank you!', 'Thanks!', 'Appreciate it!']
def initialize(birthdate, opts={})
paulallies / gist:0052fab554b14bbfa3ef
Last active Nov 30, 2021
Remove node_modules from git repo
View gist:0052fab554b14bbfa3ef
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
hdragomir / sm-annotated.html
Last active Nov 1, 2021
The deferred font loading logic for Smashing Magazine.
View sm-annotated.html
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
kimmobrunfeldt /
Last active Jul 26, 2020
Install web development tools to Mavericks (OS X 10.9)

Install web development tools to Mavericks (OS X 10.9)

Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.

I don't want: any sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).

These are my opinions. Read this document through and pick up the good parts to your preferences.

System preferences

raucao / typekit.js
Last active Feb 12, 2020
Improved Typekit embed code
View typekit.js
(function(d) {
var tkTimeout=3000;
var config = {
kitId: 'a1b2c3f4',
scriptTimeout: tkTimeout
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";if(window.sessionStorage){sessionStorage.setItem("useTypekit","false")}},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='//'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
brandonkelly /
Last active Oct 27, 2020
Templating in EE vs. Craft
wecanspeak / dumpTmuxColor
Created Dec 14, 2013
dump tmux color code
View dumpTmuxColor
printf "\n "
for i in {0..255} ; do
printf "\x1b[38;5;${i}m%-10s " $colcode
if [ $((($i+1) % 8)) = 0 ] ; then
printf "\n "
printf "\n"