This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' | |
require 'spork' | |
# Loading more in this block will cause your tests to run faster. | |
# if you change any configuration or code from libraries loaded | |
# need to restart spork for it take effect. | |
Spork.prefork do | |
ENV["RAILS_ENV"] ||= 'test' | |
require 'rails/application' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Fxx Colour Theme for Emacs. | |
;; | |
;; Defines a colour scheme resembling that of the original TextMate Fxx colour theme. | |
;; To use add the following to your .emacs file (requires the color-theme package): | |
;; | |
;; http://wiki.nofxx.com/_detail/x:xxx2tmscreen.png | |
;; | |
;; (require 'color-theme) | |
;; (color-theme-initialize) | |
;; (load-file "~/.emacs.d/fxx-emacs/color-theme-fxx.el") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEVICE = atmega32 #90s2313 | |
AVRDUDE = avrdude -c usbasp -p $(DEVICE) | |
# Choose your favorite programmer and interface above. | |
COMPILE = avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=$(DEVICE) #-DDEBUG_LEVEL=2 | |
# NEVER compile the final product with debugging! Any debug output will | |
# distort timing so that the specs can't be met. | |
OBJECTS = usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psql -U postgres | |
create database template_postgis with template = template1; | |
UPDATE pg_database SET datistemplate = TRUE where datname = 'template_postgis'; | |
\c template_postgis | |
CREATE LANGUAGE plpgsql; | |
# arch | |
\i /usr/share/postgresql/contrib/postgis-1.5/postgis.sql | |
\i /usr/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'benchmark' | |
require 'json' | |
require 'bson' | |
T = 100_000 | |
[{ :foo => 2 }, { :foo => 2, :bar => 3, :baz => "long very very long and big and uncut string" }, | |
{ :foo => 2, :bar => 3, :baz => "long very very long and big and uncut string", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DeliciousToken < ConsumerToken | |
DELICIOUS_SETTINGS = { | |
:site => 'https://api.login.yahoo.com', | |
:http_method => :get, | |
:scheme => :query_string, | |
:request_token_path => '/oauth/v2/get_request_token', | |
:access_token_path => '/oauth/v2/get_token', | |
:authorize_path => '/oauth/v2/request_auth', | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Nanite Initializer | |
# | |
def load_mapper_opts | |
YAML.load(File.read(RAILS_ROOT + "/config/rabbitmq.yml"))#.result) #[ENV["RAILS_ENV"] || "development"] | |
end | |
if ENV["NO_NM"].nil? && RAILS_ENV != "test" | |
if defined?(PhusionPassenger) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- PKGBUILD 2009-07-02 13:17:27.000000000 -0300 | |
+++ PKGBUILD 2009-12-21 16:31:34.000000000 -0200 | |
@@ -1,6 +1,6 @@ | |
# Contributor: p2k <[email protected]> | |
pkgname=rabbitmq | |
-pkgver=1.6.0 | |
+pkgver=1.7.0 | |
pkgrel=1 | |
pkgdesc="Highly reliable and performant enterprise messaging implementation of AMQP written in Erlang/OTP" | |
arch=(i686 x86_64) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'tokyotyrant' | |
module Rack | |
module Session | |
class Tyrant < Abstract::ID | |
include TokyoTyrant | |
attr_reader :mutex, :pool | |
DEFAULT_OPTIONS = Abstract::ID::DEFAULT_OPTIONS.merge :tyrant_server => "localhost:1978" | |
def initialize(app, options = {}) | |
super |