This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import glob | |
import os | |
import shutil | |
import subprocess | |
import time | |
today_frags = time.strftime("%Y-%m-%d").split("-") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const getDisplayName = (Component) => { | |
return Component.displayName || Component.name || 'Component' | |
}; | |
export const makeController = (willMount, willUnmount) => { | |
return (Component) => { | |
const noop = () => {}; | |
class Controller extends React.Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sayings=( | |
"Okay" | |
"I understand" | |
"Sure, why not" | |
"Thanks for coming" | |
"Sounds good" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; Emacs configuration for Matt Dawson | |
;;;; Inspiration taken from many places, but especially Ron DuPlain's config. | |
;;;; GNU Emacs 24 | |
;;; Basics | |
;; Define load paths. | |
(setq load-path (cons "~/.emacs.d" load-path)) | |
(add-to-list 'load-path "~/.emacs.d/slime") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PROJECT_NAME=something | |
REPO=someone/$PROJECT_NAME | |
API_BASE=https://api.github.com/repos/$REPO | |
UPLOAD_BASE=https://uploads.github.com/repos/$REPO | |
BUILD_ID=v`less bower.json | jq -r '.version'`-$BUILD_API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static char get_formatted_countdown() { | |
int seconds = s_countdown_seconds % 60; | |
int minutes = (s_countdown_seconds / 60) % 60; | |
char str[6]; | |
return sprintf(str, "%d:%d", minutes, seconds); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = { | |
blake: 20, | |
andrew: 10, | |
matt: 45 | |
}; | |
var annotated = _.map(obj, function (value, key) { | |
return {key: key, value: value}; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'marionette', | |
'marionette.formview' | |
], function (Marionette) { | |
'use strict'; | |
Marionette.Renderer.render = function (template, data) { | |
return template(data); | |
}; |
NewerOlder