Skip to content

Instantly share code, notes, and snippets.

View insin's full-sized avatar
⚠️
Cannot read property 'status' of undefined

Jonny Buchanan insin

⚠️
Cannot read property 'status' of undefined
View GitHub Profile
@insin
insin / no-semicolons.js
Created October 5, 2011 00:15 — forked from indexzero/no-comma-first.js
JUST SAY NO TO SEMICOLONS
var fs = require('fs')
, path = require('path')
, colors = require('colors')
, argv = require('optimist').argv
fs.readFile(path.join(__dirname, argv._[0]), function (err, data) {
var lines = data.toString().split('\n')
for (var i = 0; i < lines.length; i++) {
var match = lines[i].match(/;\s*(?:\/\/.*)?$/)
if (match) {
@insin
insin / bash_prompt.sh
Created December 3, 2011 01:49 — forked from woods/git_svn_bash_prompt.sh
Set color bash prompt according to active virtualenv, git branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@insin
insin / penner_beziers.js
Created June 24, 2012 19:42 — forked from madrobby/penner_beziers.js
Penner beziers
var beziers = {
easeInQuad: '.55,.085,.68,.53'
, easeInCubic: '.55,.055,.675,.19'
, easeInQuart: '.895,.03,.685,.22'
, easeInQuint: '.755,.05,.855,.06'
, easeInSine: '.47,0,.745,.715'
, easeInExpo: '.95,.05,.795,.035'
, easeInCirc: '.6,.04,.98, .335'
, easeInBack: '.6,-.28,.735,.045'
, easeOutQuad: '.25,.46,.45,.94'
@insin
insin / penner_beziers.number
Created June 24, 2012 20:03 — forked from madrobby/penner_beziers.js
Penner beziers
1791656277811493031594071461534991480627883818443643332265598359849961071923721241979344403603416137980956727244123760604960073429107153174138799426699369040110073942339469352064139152616815779351725451409903792674622321989783206500920392551280245755119305905049733203287299987691385211675050945752567318219060417366628558248882558907516703276400880493331164685917230237156179389574864149344435589976209643987835593227061742165380067670004535173279450259928102210712066102429990394061986877082576682354461449455273738379807517019102423573614377372280098002225588350528749953974499929098993595870573175195111989702300425748883521688735157135629772418003445070382315365742158480367746871453414549171291653802871742066345866953046451641243011726710826522212048170145716720657940825649420349479951546752610269886054294928529232904650183030388822744459452264294504935270671749782940538142864022130895205291875111657893282592565962101832890336569288120364269983661752826934453553052247449228241948936186794455929767436696938337387
@insin
insin / lex.js
Created July 6, 2012 10:07 — forked from tj/lex.js
/**
* Scan the given `str` returning tokens.
*
* @param {String} str
* @return {Array}
* @api public
*/
module.exports = function(str) {
var indents = [0]
@insin
insin / 00-README.rst
Created December 13, 2012 00:14 — forked from anonymous/01-table.html
Creating nested contents and pulling out created element references with dombuilder

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

#!/bin/bash
# Favicon and Apple Touch Icon Generator
#
# This bash script takes an image as a parameter, and uses ImageMagick to convert it to several
# other formats used on modern websites. The following copies are generated:
#
# * apple-touch-icon-114x114-precomposed.png
# * apple-touch-icon-57x57-precomposed.png
# * apple-touch-icon-72x72-precomposed.png
@insin
insin / timeout.html
Last active December 27, 2015 16:49 — forked from jcoglan/timeout.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<body>
<script>
// alerts 'fake' then 'real'
@insin
insin / reporter.js
Created January 22, 2014 00:13 — forked from Macil/reporter.js
(function(exports) {
function nop() {}
// IE doesn't always have console, place a no-op shim for it.
if (!window.console) {
window.console = {log: nop, info: nop, warn: nop, error: nop};
}
// Transforms an Error to a simple object that can be JSONified.
function error_to_object(error) {