Skip to content

Instantly share code, notes, and snippets.

@nandub
nandub / elf.h
Created September 23, 2012 08:35
MacOS X elf.h missing include file
#include <libelf/gelf.h>
/* Intel 80386 specific definitions. */
/* i386 relocs. */
#define R_386_NONE 0 /* No reloc */
#define R_386_32 1 /* Direct 32 bit */
#define R_386_PC32 2 /* PC relative 32 bit */
#define R_386_GOT32 3 /* 32 bit GOT entry */
@nandub
nandub / test_local_changes
Created July 20, 2012 02:37
To test local changes for hubot and hubot-irc
"dependencies": {
...
"hubot-irc": "git://github.com/YOUR_NAME/hubot-irc.git",
...
}
@nandub
nandub / next branch error
Created March 31, 2012 08:36
NoMethodError - undefined method `map!'
$ rake start
03:29:09 web.1 | started with pid 58556
03:29:09 realtime.1 | started with pid 58557
03:29:50 web.1 | NoMethodError - undefined method `map!' for #<Appscript::CommandError:0x108021580>:
03:29:50 web.1 | /Users/fortiz/development/tools/playdj/app/api/helpers.rb:21:in `songs_as_json'
03:29:50 web.1 | /Users/fortiz/development/tools/playdj/app/api/queue.rb:6:in `GET /queue'
03:29:50 web.1 | /Users/fortiz/.rvm/gems/ruby-1.8.7-p357/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `call'
03:29:50 web.1 | /Users/fortiz/.rvm/gems/ruby-1.8.7-p357/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `compile!'
03:29:50 web.1 | /Users/fortiz/.rvm/gems/ruby-1.8.7-p357/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
03:29:50 web.1 | /Users/fortiz/.rvm/gems/ruby-1.8.7-p357/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `route!'
@nandub
nandub / play bundle install fail
Created March 31, 2012 02:58
rb-fsevent 0.4.3.1 fail to compile
$ bundle install
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Using rake (0.9.2.2)
Using SystemTimer (1.2.3)
Using multi_json (1.0.3)
Using activesupport (3.1.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.1)
@nandub
nandub / phantomjs.rb
Created March 30, 2012 22:41 — forked from fabiomcosta/phantomjs.rb
proposed phantomjs formula
require 'formula'
class NeedsSnowLeopardOrNewer < Requirement
def satisfied?
MacOS.snow_leopard?
end
def message
"phantomjs requires Mac OS X 10.6 (Snow Leopard) or newer."
end
@nandub
nandub / io-formula-head-fail
Created March 29, 2012 06:53
Io install failed for HEAD
$ brew install -v io --HEAD
==> Installing io
==> Cloning https://github.com/stevedekorte/io.git
git clone --depth 1 https://github.com/stevedekorte/io.git /Library/Caches/Homebrew/io--git
Cloning into '/Library/Caches/Homebrew/io--git'...
remote: Counting objects: 6135, done.
remote: Compressing objects: 100% (4184/4184), done.
remote: Total 6135 (delta 2045), reused 4540 (delta 1297)
Receiving objects: 100% (6135/6135), 15.02 MiB | 184 KiB/s, done.
Resolving deltas: 100% (2045/2045), done.
@nandub
nandub / gperf_3.0.4_generated_zconf.hash.c
Created March 18, 2012 23:36
Valid gperf 3.0.4 zconf.hash.c file
/* ANSI-C code produced by gperf version 3.0.4 */
/* Command-line: src/gperf ../crosstool-ng-1.14.1/kconfig/zconf.gperf */
/* Computed positions: -k'1,3' */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
@nandub
nandub / gperf_3.0.3_generated_zconf.hash.c
Created March 18, 2012 23:32
Invalid gperf 3.0.3 zconf.hash.c file
/* ANSI-C code produced by gperf version 3.0.3 */
/* Command-line: gperf ../crosstool-ng-1.14.1/kconfig/zconf.gperf */
/* Computed positions: -k'1,3' */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
@nandub
nandub / crosstool-ng-1.16.0_clang_offsetof_fix.patch
Created February 27, 2012 11:29
crosstool-ng 1.16.0 - Fixes clang offsetof compatability.
diff --git a/Makefile.in b/Makefile.in
index 3772058..74a2d79 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -348,7 +348,7 @@ KCONFIG_FILES := conf mconf nconf kconfig.mk
install-lib-kconfig: $(DESTDIR)$(libdir) install-lib-main
@echo " INST 'kconfig/'"
@for f in $(KCONFIG_FILES); do \
- install -D "kconfig/$${f}" "$(DESTDIR)$(libdir)/kconfig/$${f}"; \
+ $(install) -D "kconfig/$${f}" "$(DESTDIR)$(libdir)/kconfig/$${f}"; \
@nandub
nandub / gist:1381650
Created November 21, 2011 04:44
git fix merge conflicts steps
cd <PROJECT>
git remote add upstream git@github.com:<GITHUB_ACCOUNT_NAME>/<PROJECT>.git
git fetch upstream
#Stash/commit all your work
git checkout develop
git merge upstream/develop
git checkout <FEATURE_BRANCH>
git merge develop
#Fix errors, merge conflicts, etc.
#Run tests