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
# Copyright (c) 2008 Nicholas A. Evans | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, | |
# distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so, subject to | |
# the following conditions: | |
# |
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
# Ruby Git Archlinux PKGBUILD | |
# Contributor: nofxx <[email protected]> | |
pkgname=ruby-git | |
pkgver=20081228 | |
pkgrel=1 | |
pkgdesc="A dynamic, open source programming language with a focus on simplicity and productivity." | |
arch=(i686 x86_64) | |
url="http://www.ruby-lang.org/en/" | |
license="Ruby" | |
depends=('glibc' 'gdbm' 'db' 'openssl' 'zlib' 'readline') |
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
# | |
# Return UTM Zone for a geom | |
# | |
# Return Integer | |
def utm_zone | |
geomgeog = srid == 4326 ? self[get_column_name] : transform(4326) | |
puts geomgeog.class | |
geom = case geomgeog.class.to_s | |
when /Point/ then geomgeog | |
when /LineString/ then geomgeog.first |
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
Section "ServerLayout" | |
# PS/2 Mouse not detected | |
# Serial Mouse not detected | |
Identifier "Xorg Configured" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "USB Mouse" "CorePointer" | |
# Option "AIGLX" "on" | |
EndSection |
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
# Ramaze Cucumber | |
require 'ramaze' | |
require 'webrat' | |
require 'ramaze/spec/bacon' | |
require File.join(File.dirname(__FILE__), *%w[.. .. start.rb]) | |
def app; Ramaze.middleware; end | |
Ramaze.setup_dependencies | |
Webrat.configure do |config| |
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 'memcache' | |
require 'memcached' | |
require 'rufus/tokyo' | |
require 'tokyocabinet' | |
tc = TokyoCabinet::HDB.new('tc.tch') | |
tffi = Rufus::Tokyo::Cabinet.new('tffi.tch') | |
mc = Memcached.new "localhost:11211" | |
mr = MemCache.new "localhost:11211" |
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 LogApp | |
def initialize(m, c, text, req) | |
HoptoadNotifier.notify( | |
:error_class => m.to_s.capitalize, | |
:error_message => text, | |
:request => req, | |
:backtrace => c) | |
end |
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
# | |
# Tokyo Tyrant rake tasks | |
# | |
# rake tyrant:restart # Restart Tyrant server | |
# rake tyrant:start # Start Tyrant server | |
# rake tyrant:stop # Stop Tyrant server | |
# | |
namespace :tyrant do | |
desc "Start Tyrant server" |
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
#!/bin/bash | |
# NGINX RC.D SCRIPT | |
# Archlinux | |
NGINX_CONFIG="/opt/nginx/conf/nginx.conf" | |
NGINX_BIN="/opt/nginx/sbin/" | |
#. /etc/conf.d/nginx | |
. /etc/rc.conf | |
. /etc/rc.d/functions |
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 | |
# | |
# Simple script to rename all columns/index/seq on rails app postgresql db | |
# | |
# Usage: pg_rename foo bar | |
# | |
require 'rubygems' | |
require 'activerecord' | |
require 'annotate/annotate_models' | |
require 'config/boot' |