Skip to content

Instantly share code, notes, and snippets.

@danielsharvey
danielsharvey / merge.js
Created January 30, 2017 03:38
Javascript merge function
function merge(left, right, sortFieldName){
var ret = []
var il = 0
var ir = 0
while (il < left.length && ir < right.length) {
if (left[il][sortFieldName].valueOf() < right[ir][sortFieldName].valueOf()) {
ret.push(left[il++])
} else {
ret.push(right[ir++])
@danielsharvey
danielsharvey / convert_cpbitmap
Last active September 15, 2022 14:32
Converting iPhone iOS '.cpbitmap' images to PNGs
#!/usr/bin/python
from PIL import Image,ImageOps
import struct
import sys
if len(sys.argv) < 3:
print "Need two args: source_filename and result_filename\n";
sys.exit(0)
filename = sys.argv[1]
result_filename = sys.argv[2]
@danielsharvey
danielsharvey / build_number.json
Last active June 6, 2019 02:47 — forked from amcdnl/version.ts
Automatic version stamping with build number
{
"buildNumber": 1
}

Keybase proof

I hereby claim:

  • I am danielsharvey on github.
  • I am danielharvey (https://keybase.io/danielharvey) on keybase.
  • I have a public key ASAoi1eR1bd8Nr1unIuenJSqXq3YIaTvlLLuiCk9TuYm9Ao

To claim this, I am signing this object:

@danielsharvey
danielsharvey / 1-macOS-Launchctl-limits.md
Created May 30, 2020 05:27 — forked from tkuennen/1-macOS-Launchctl-limits.md
How to Change Open Files Limit on macOS (10.8 - 10.13)