Skip to content

Instantly share code, notes, and snippets.

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

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 / build_number.json
Last active Jun 6, 2019 — forked from amcdnl/version.ts
Automatic version stamping with build number
View build_number.json
{
"buildNumber": 1
}
@danielsharvey
danielsharvey / convert_cpbitmap
Last active Apr 23, 2021
Converting iPhone iOS '.cpbitmap' images to PNGs
View convert_cpbitmap
#!/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 / merge.js
Created Jan 30, 2017
Javascript merge function
View merge.js
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++])