Skip to content

Instantly share code, notes, and snippets.

View redterror's full-sized avatar

Dave Steinberg redterror

  • Chapel Hill, NC
View GitHub Profile
@redterror
redterror / shmsetup.sh
Created September 27, 2013 17:52 — forked from jodell/shmsetup.sh
#!/bin/bash
# http://archives.postgresql.org/pgsql-admin/2010-05/msg00285.php
# Output lines suitable for sysctl configuration based
# on total amount of RAM on the system. The output
# will allow up to 50% of physical memory to be allocated
# into shared memory.
# On Linux, you can use it as follows (as root):
#
# ./shmsetup >> /etc/sysctl.conf
@redterror
redterror / gist:5199680
Last active December 15, 2015 04:09 — forked from lemonhall/gist:3120320
/*
* FormData for XMLHttpRequest 2 - Polyfill for Web Worker (c) 2012 Rob W
* License: Creative Commons BY - http://creativecommons.org/licenses/by/3.0/
* - append(name, value[, filename])
* - toString: Returns an ArrayBuffer object
*
* Specification: http://www.w3.org/TR/XMLHttpRequest/#formdata
* http://www.w3.org/TR/XMLHttpRequest/#the-send-method
* The .append() implementation also accepts Uint8Array and ArrayBuffer objects
* Web Workers do not natively support FormData: