Skip to content

Instantly share code, notes, and snippets.

View sllvn's full-sized avatar
🔥

Andrew Sullivan sllvn

🔥
View GitHub Profile
@gringocl
gringocl / kexp_playlist.json
Created May 25, 2014 18:54
kexp top 100 artists by total plays 2001 - 2014
{"_id"=>nil, "total_plays"=>486721}
{"_id"=>"(Various Artists) ", "total_plays"=>5858}
{"_id"=>"Radiohead", "total_plays"=>5181}
{"_id"=>"Beck", "total_plays"=>3713}
{"_id"=>"Built to Spill", "total_plays"=>3439}
{"_id"=>"Pixies", "total_plays"=>3404}
{"_id"=>"Modest Mouse", "total_plays"=>3173}
{"_id"=>"Arcade Fire", "total_plays"=>3130}
{"_id"=>"Death Cab for Cutie", "total_plays"=>3033}
{"_id"=>"Wilco", "total_plays"=>3019}
@addyosmani
addyosmani / README.md
Last active October 2, 2025 12:05 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@nyg
nyg / iOSCreatePDF.swift
Last active May 9, 2025 20:44
iOS, Swift: Create a PDF file from an HTML string.
// Thanks to http://www.labs.saachitech.com/2012/10/23/pdf-generation-using-uiprintpagerenderer
// Note: including images in the HTML won't work, see here:
// https://github.com/nyg/HTMLWithImagesToPDF
import UIKit
// 1. Create a print formatter
let html = "<b>Hello <i>World!</i></b>"
let fmt = UIMarkupTextPrintFormatter(markupText: html)
@ericelliott
ericelliott / essential-javascript-links.md
Last active June 14, 2025 18:43
Essential JavaScript Links

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

angular.injector

Creates an injector object that can be used for retrieving services as well as for dependency injection

  // create an injector
  var $injector = angular.injector(['ng']);
  // use the injector to kick off your application
  // use the type inference to auto inject arguments, or use implicit injection
 $injector.invoke(function($rootScope, $compile, $document){
@daviferreira
daviferreira / compiler.js
Last active April 18, 2017 21:42
Mocha compiler for es6 + react components with css require statements
'use strict';
var babel = require('babel-core');
var fs = require('fs');
// borrowed from https://github.com/babel/babel-jest/blob/master/index.js
require.extensions['.jsx'] = function (module, filename) {
var src = fs.readFileSync(filename, 'utf8');
// Allow the stage to be configured by an environment
// variable, but use Babel's default stage (2) if
@forabi
forabi / Webpack 2.0.7-beta vs Rollup
Last active August 20, 2024 13:14
Webpack 2 vs Rollup
❯ rollup --version
rollup version 0.25.3
❯ time rollup -c ./rollup.js
rollup -c ./rollup.js 4.65s user 0.22s system 118% cpu 4.131 total
❯ time webpack
Hash: ebb00bbccd954c114d3c
Version: webpack 2.0.7-beta
Time: 3623ms
@rebeccawilliams
rebeccawilliams / opendatapolicies.csv
Last active June 21, 2016 04:30
Open Data Policies by Type, see more at: https://sunlightfoundation.com/policy/opendatamap/ & https://docs.google.com/spreadsheets/d/1ETZuGZBK24J2viZdxmhyIlIKiJuytAu3Bh1ofo_HVBw/; if there was an amendment/new EO I counted it again, also DC is listed as a city here w city-counties being counted as counties
year how many ordinance or law resolution exective order or directive admin memo, IT policy, etc city county state
2006 1 0 0 0 1 1 0 0
2009 3 2 0 1 0 2 1 0
2010 1 1 0 0 0 0 1 0
2011 4 2 1 0 1 1 2 1
2012 7 5 0 2 0 5 1 1
2013 16 7 0 5 4 8 3 5
2014 20 11 1 6 2 14 3 3
2015 8 1 1 3 3 8 0 0
2016 9 2 4 3 0 8 0 1

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.