Skip to content

Instantly share code, notes, and snippets.

View Fishrock123's full-sized avatar
💭
#freepalestine #blacklivesmatter #acab drop ICE you cowards

Jeremiah Senkpiel Fishrock123

💭
#freepalestine #blacklivesmatter #acab drop ICE you cowards
View GitHub Profile
@Fishrock123
Fishrock123 / git.log
Created April 4, 2015 05:39
git log --pretty=full --since="$(git show -s --format=%ad `git rev-list --max-count=1 --tags`)" --until="" --pretty=oneline --abbrev-commit | pbcopy
8c6c376 doc: add GPG fingerprint for Fishrock123
ccbea18 doc: better formatting for collaborator GPG keys
3a69b76 benchmark: add rsa/aes-gcm performance test
1c709f3 benchmark: add/remove hash algorithm
f782824 deps: refactor openssl.gyp
eb459c8 tools: fix gyp to work on MacOSX without XCode
15f058f gyp: fix build with python 2.6
21f4fb6 deps: update gyp to e1c8fcf7
efadffe win,node-gyp: optionally allow node.exe/iojs.exe to be renamed
dac903f deps: make node-gyp work with io.js
@Fishrock123
Fishrock123 / todo.md
Last active August 29, 2015 14:08
code-related things to do
Done Status Priority Difficulty Description
 | asap                    | ★★★★★★   | ★★         | Express-wide Contributing.md
 | argh!!                  | ★        | ★★★★★      | Github release history tool
 | should do               | ★★★      | ★★★        | jshttp style-guide template generator

| this weekend maybe | ★★★★ | ★★★★ | Transition my wip game to react & flux

@Fishrock123
Fishrock123 / aliases.bash
Last active August 29, 2015 14:05
git aliases
# see http://stackoverflow.com/questions/15316601/in-what-cases-could-git-pull-be-harmful
git config --global alias.up '!up() { git remote update -p $1; git merge --ff-only @{u}; }; up'
# git up
# git up your-remote
// should do the same as
// var args = Array.prototype.slice.call(arguments)
// without leaking arguments
var i = arguments.length
var args = new Array(i)
while (i-- !== 0) args[i] = arguments[i]
// should do the same as
// var args = Array.prototype.slice.call(arguments, 3);
document.addEventListener('keydown', function (event) {
if (!/INPUT|SELECT|TEXTAREA/i.test(event.target.tagName)) {
event.preventDefault()
}
})
// Returns a non-leaking, optimizable, safe close of `arguments`
// usage: var args = clone_args.apply(this, arguments)
module.exports = function clone_args() {
var i = arguments.length
var clone = new Array(i)
while (i--) clone[i] = arguments[i]
return clone
@Fishrock123
Fishrock123 / lengthOfBytes.swift
Last active August 29, 2015 14:02
Counts the average byte length in a unicode string. (lol)
// assuming utf-8 where characters are "normally" 1 byte (so the byte's default length is 8 bits.)
import Cocoa
func lengthOfBytes(s: String) -> Double {
let count = Double(countElements(s))
let bytes = Double(s.lengthOfBytesUsingEncoding(NSUTF8StringEncoding))
let extra = (bytes - count) / count
return 8 * (1.0 + extra)
@Fishrock123
Fishrock123 / thing.js
Last active August 29, 2015 14:01
not thunkifying correctly or something (fixed)
var co = require('co')
var readln = require('readline')
var rl = readln.createInterface({
input: process.stdin
, output: process.stdout
})
// make rl.question a thunk
function confirm(question) {
@Fishrock123
Fishrock123 / pixi.TextInput.js
Created May 16, 2014 20:20
TextInput Element for pixi.js
/**!
* name: pixi.TextInput.js
* repository: https://gist.github.com/Fishrock123/7ce7da8cacd762a56542
* @author Jeremiah Senkpiel - https://searchbeam.jit.su
* @version 0.2
* MIT Licensed - Copyright 2013 Jeremiah Senkpiel
*/
(function(){
@Fishrock123
Fishrock123 / sublime-settings.json
Created April 14, 2014 22:04
My Sublime Text 2 settings. (14 / 04 / 2014)
{
"auto_complete_triggers":
[
{
"characters": "<."
}
],
"bold_folder_labels": false,
"caret_style": "phase",
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",