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 | |
# This script attacks either all file arguments given to it, or all png's in a subtree (if | |
# a directory or no argument is given), and runs both pngcrush and optipng on them with liberal settings. | |
CRUSH=$(which pngcrush) | |
OPTI=$(which optipng) | |
OPTS1='-rem cHRM -rem gAMA -rem iCCP -rem sRGB -q' | |
OPTS2='-quiet -fix -o4' | |
TEMP="/tmp/temp.png" | |
BEFORE=0 |
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
/* | |
* Tiny tokenizer | |
* | |
* - Accepts a subject string and an object of regular expressions for parsing | |
* - Returns an array of token objects | |
* | |
* tokenize('this is text.', { word:/\w+/, whitespace:/\s+/, punctuation:/[^\w\s]/ }, 'invalid'); | |
* result => [{ token="this", type="word" },{ token=" ", type="whitespace" }, Object { token="is", type="word" }, ... ] | |
* | |
*/ |
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
/* | |
* A variation on a jQuery style each function for massive or labour intensive | |
* loops where the thread is yielded every so often to prevent script timeouts. | |
* | |
* (c) Borgar Thorsteinsson | |
* Licenced under the terms of the MIT/GPL software licenses. | |
* | |
* The function accepts these arguments: | |
* | |
* `obj`: an array, object, or string to be looped though. |
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 python | |
""" | |
Git pre-commit hook to prevent JS trailing commas being checked in. | |
They have a tendency to sneak into the project and they crash MSIE7. | |
""" | |
import sys | |
import re | |
import subprocess | |
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
/** | |
* Searches the interval from <tt>lowerLimit</tt> to <tt>upperLimit</tt> | |
* for a root (i.e., zero) of the function <tt>func</tt> with respect to | |
* its first argument using Brent's method root-finding algorithm. | |
* | |
* Translated from zeroin.c in http://www.netlib.org/c/brent.shar. | |
* | |
* Copyright (c) 2012 Borgar Thorsteinsson <[email protected]> | |
* MIT License, http://www.opensource.org/licenses/mit-license.php | |
* |
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
### Keybase proof | |
I hereby claim: | |
* I am borgar on github. | |
* I am borgar (https://keybase.io/borgar) on keybase. | |
* I have a public key whose fingerprint is 1964 9E49 702A CC81 3B14 14F0 5A96 CA4A A3F8 E964 | |
To claim this, I am signing this object: |
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
license: mit | |
height: 500 |
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
license: mit | |
height: 800 |
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
license: mit | |
height: 500 | |
border: no |
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
license: cc-by-nc-sa-4.0 | |
height: 500 | |
border: no |
OlderNewer