Skip to content

Instantly share code, notes, and snippets.

View naterh's full-sized avatar

Nada Who naterh

View GitHub Profile
@naterh
naterh / osx-for-hackers.sh
Created December 29, 2015 17:52 — forked from matthewmueller/osx-for-hackers.sh
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@naterh
naterh / gist:c00caf9c940578eec138
Created December 16, 2015 21:08
BMC device map definition data? Extracted from embedded binaries.
------ FILENAME FI_fwid.bin -------
00000000 03 02 42 4d 43 30 30 31 30 1f 00 05 02 00 00 59 |..BMC0010......Y|
00000010 ff 5f 00 00 00 00 00 00 00 00 00 00 01 00 c9 00 |._..............|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0000003e
----------------------
------ FILENAME FT_fl.bin -------
00000000 01 18 00 00 00 00 00 00 01 10 00 00 18 00 00 00 |................|
00000010 00 00 00 00 00 00 00 be 00 00 |..........|
@naterh
naterh / gist:979632b0496967bac93d
Created July 22, 2015 19:45
grub2 compile automation
sudo apt-get update && sudo apt-get install git bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev libfreetype6-dev texinfo ia32_libs build_essential
git clone git://git.savannah.gnu.org/grub.git
cd grub
./autogen.sh
./configure --target=i386 --program-prefix=""
make
cd grub-core
@naterh
naterh / gist:5b4793f3055be7548048
Created July 22, 2015 19:45
grub2 compile automation
sudo apt-get update && sudo apt-get install git bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev libfreetype6-dev texinfo ia32_libs build_essential
git clone git://git.savannah.gnu.org/grub.git
cd grub
./autogen.sh
./configure --target=i386 --program-prefix=""
make
cd grub-core
@naterh
naterh / libusb-devel.rb
Last active August 29, 2015 14:21
libusb-devel brew formula sha256
require 'formula'
class LibusbDevel < Formula
url 'https://github.com/OpenNI/OpenNI/blob/4dbf64bc45b880bfda6aa6bb2a30d1ddd03a8c65/Platform/Linux/Build/Prerequisites/libusb-1.0.8-osx.tar.bz2?raw=true'
homepage 'http://www.libusb.org/'
sha256 'e9c39943bedba9aca0c776673040602596b1a7ae880d359e25c07f48971372e9'
depends_on "automake" => :build
depends_on "libtool" => :build
@naterh
naterh / gist:6426030
Created September 3, 2013 16:14
Keyring stacktrace
======================================================================
ERROR: Failure: ValueError (Attempted relative import in non-package)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/lib/jenkins/workspace/checkmate-test-pull-request/.tox/prjenkins/local/lib/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
addr.filename, addr.module)
File "/var/lib/jenkins/workspace/checkmate-test-pull-request/.tox/prjenkins/local/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/var/lib/jenkins/workspace/checkmate-test-pull-request/.tox/prjenkins/local/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
"""Decorator to quickly add statsd (graphite) instrumentation to Celery
task functions.
With some slight modification, this could be used to instrument just
about any (non-celery) function and be made abstract enough to customize
metric names, etc.
Stats reported include number of times the task was accepted by a worker
(`started`), the number of successes, and the number of times the task
raised an exception. In addition, it also reports how long the task took