Skip to content

Instantly share code, notes, and snippets.

View jonchretien's full-sized avatar
📷

Jon C. jonchretien

📷
View GitHub Profile
@TylerFisher
TylerFisher / LICENSE
Last active August 29, 2015 14:08
Our elections app relied on a 16x9 slide layout across all devices, regardless of the size of the actual screen. We wrote some tricky CSS and JavaScript to achieve this.
The MIT License (MIT)
Copyright (c) 2014 NPR
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@davidxia
davidxia / lunch_and_learn-2012-9-7.md
Created September 6, 2012 21:43
NYC Lunch and Learn - September 7, 2012 - Neville Li & David Xia

NYC Lunch and Learn

September 7, 2012

Neville Li & David Xia

Use Command Line Shortcuts

Basic

@davidxia
davidxia / lunch_and_learn-2012-9-7.md
Created September 20, 2012 20:29
NYC Lunch and Learn - September 21, 2012 - Neville Li & David Xia

NYC Lunch and Learn

September 21, 2012

Neville Li & David Xia

To me vi is zen. To use vi is to practice zen. Every command is a koan. Profound to the user, unintelligible to the uninitiated. You discover truth every time you use it. — Satish Reddy

Vim Basics

@benjaminjackson
benjaminjackson / excel2json.rb
Created July 26, 2013 16:58
No more copying and pasting Word docs into JSON files.
#! /usr/bin/ruby
require 'iconv'
require 'roo'
require 'csv'
require 'json'
begin
ARGV.each do |file|
file_basename = File.basename(file, ".xlsx")
@jgarber623
jgarber623 / _profile-links.scss
Created October 14, 2013 22:21
Sass 3.3 adds a new SassScript Maps feature that's super handy.
@jrburke
jrburke / apiexamples.js
Created April 7, 2011 05:50
Description of browser-friendly module APIs: AMD and Loader Plugins
//*******************************************
// Level 1, basic API, minimum support
//*******************************************
/*
Modules IDs are strings that follow CommonJS
module names.
*/
//To load code at the top level JS file,
//or inside a module to dynamically fetch
@ericelliott
ericelliott / black-box-composition.js
Last active February 19, 2016 16:31
Black box composition example
const pooper = (delay) => {
return {
lastPoop: null,
getPoopDelay () { return delay; },
canPoop: function(now) {
return this.lastPoop ? (this.lastPoop + delay) >= now : true
},
poop: function(){
if(this.canPoop(new Date())){
//implementation for pooping is omitted
@clintfisher
clintfisher / gist:3912411
Last active April 1, 2017 00:23
Textmate style selection reformat with Sublime Text 2
Preferences > Key Bindings - User
Add:
[
{ "keys": ["command+shift+r"], "command": "reindent" , "args": { "single_line": false } }
]
The argument allows the command to also work on the entire file in addition to a selection.
@stubbornella
stubbornella / media-object.jsx
Created December 18, 2014 15:29
Media Object from OOCSS and now Bootstrap written in React/jsx
'use strict';
var React = require('react/addons');
var _ = require('lodash');
var setClass = React.addons.classSet;
var MediaObject = React.createClass({
render: function () {
var classes = setClass({
'media-left': this.props.horizontalAlignment === 'left',
@abelsonlive
abelsonlive / dot-cat.sh
Last active May 11, 2018 08:03
dot-cat.sh
#!/bin/sh
curl http://cat.www.$1.com.meowbify.com/ > index.html
s3cmd put index.html s3://$1.cat/