Skip to content

Instantly share code, notes, and snippets.

@bmix
bmix / csv.js
Created February 2, 2017 03:34 — forked from deostroll/csv.js
csv to json
// Production steps of ECMA-262, Edition 5, 15.4.4.18
// Reference: http://es5.github.io/#x15.4.4.18
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(callback, thisArg) {
var T, k;
if (this == null) {
throw new TypeError(' this is null or not defined');
@bmix
bmix / annotated-jshintrc.txt
Created February 2, 2017 02:21 — forked from JamieMason/annotated-jshintrc.txt
An annotated .jshintrc file, based on the docs at http://jshint.com/docs/options.
{
/**
* Tell JSHint about global variables.
*/
"predef": [
// https://github.com/pivotal/jasmine
"after",
"afterEach",
@bmix
bmix / emoji_sad.txt
Created November 28, 2012 09:42 — forked from mranney/emoji_sad.txt
Why we can't process Emoji anymore
From: Chris DeSalvo <chris.desalvo@voxer.com>
Subject: Why we can't process Emoji anymore
Date: Thu, 12 Jan 2012 18:49:20 -0800
Message-Id: <AE459007-DF2E-4E41-B7A4-FA5C2A83025F@voxer.com>
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
@bmix
bmix / windows.h__.js
Created November 18, 2012 21:26
windows.h.js INFINITY
var ffi = require('ffi'),
ref = require('ref'),
Struct = require('ref-struct'),
Library = require('./Library'),
Type = ref.Type,
NULL = ref.NULL,
isNull = ref.isNull;
var groups = ['libs', 'types', 'structs', 'callbacks', 'enums'];
@bmix
bmix / gist:1948479
Created March 1, 2012 09:10
Failed 'brew update' now what?
Latest output after 'git reset --hard'
caco:local bmix$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# Library/Aliases/boost-jam
# Library/Aliases/fastcgi
# Library/Aliases/gpg2
coca:~ bmix$ brew install gptsync
==> Downloading http://downloads.sourceforge.net/refit/refit-src-0.14.tar.gz
######################################################################## 100,0%
==> Patching
patching file gptsync/Makefile.unix
==> make -f Makefile.unix
gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wall -c gptsync.c -o gptsync.unix.o
gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wall -c lib.c -o lib.unix.o
gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DPROGNAME=gptsync -Wall -c os_unix.c -o os_unix.gptsync.o
gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wall -c showpart.c -o showpart.unix.o
@bmix
bmix / gist:1290706
Created October 16, 2011 09:33
sane-backend fail, though libusb is installed
brew install sane-backends
==> Downloading ftp://ftp2.sane-project.org/pub/sane/sane-backends-1.0.22/sane-backends-1.0.22.tar.gz
File already downloaded in /Users/bmix/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/sane-backends/1.0.22 --without-gphoto2 --enable-local-backends --enable-libusb --disable-latex
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
@bmix
bmix / gist:1226374
Created September 19, 2011 12:09
brew install -v fuse4x >2&1 for fuse4x issue on OS X 10.6.8 32bit
==> Cloning https://github.com/fuse4x/fuse.git
Updating /Users/bmix/Library/Caches/Homebrew/fuse4x--git
git remote set-url origin https://github.com/fuse4x/fuse.git
git fetch origin
git fetch --tags
==> Checking out tag fuse4x_0_8_12
git checkout fuse4x_0_8_12
HEAD is now at a4d177b... Use exact header where PAGE_SIZE is specificified
git checkout-index -a -f --prefix=/private/tmp/homebrew-fuse4x-0.8.12-ippG/
==> autoreconf --force --install
@bmix
bmix / gist:1226369
Created September 19, 2011 12:04
brew doctor (filing isse for fuse4x on OS X 10.6.8 32bit)
If you have installed MacGPG2 via the package installer, several other
checks in this script will turn up problems, such as stray .dylibs in
/usr/local and permissions issues with share and man in /usr/local/.
(YES! I DID!)
Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
an abstract class describing any possible object:
CLASS: Anything {
ATTRIBUTE: i.am_asociated_with = [a list of associations]
METHOD: i.associate_with(INPUT) {
i.am_associated_with.Append(INPUT)
}
METHOD: i.report_associations() {