Skip to content

Instantly share code, notes, and snippets.

View oogali's full-sized avatar

Omachonu Ogali oogali

  • Ordinary Stack
  • Princeton, NJ
  • 11:04 (UTC -04:00)
View GitHub Profile
@onyxfish
onyxfish / fabfile.py
Created February 9, 2010 23:05
Chicago Tribune News Applications fabric deployment script
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"
@levity
levity / att.rb
Created May 2, 2011 20:34
scrape your historical monthly data usage (in KB) from att.com
#!/usr/bin/ruby
LOGIN, PASSWORD = 'your_number', 'your_password'
require 'rubygems'
require 'mechanize'
agent = Mechanize.new
agent.get 'https://wireless.att.com'
login = agent.page.forms_with(:name=>'loginActionForm').first
@eric
eric / README.md
Created June 20, 2011 23:50 — forked from mheffner/README.md
Setting up syslog logging on Heroku with Sinatra 1.2.x

Setting up syslog logging on Heroku with Sinatra 1.2.x

1. Update your Gemfile to include:

gem 'remote_syslog_logger'

3. Modify your config.ru to match the example one below.

4. Setup REMOTE_SYSLOG_URI environment variable

@starenka
starenka / .gitignore
Created September 18, 2011 20:02
fabfile to deploy flask app to nginx/supervisor/uwsgi stack
.idea/*
*.pyc
@nesquena
nesquena / linode_fog.rb
Created October 28, 2011 09:24
Linode and Fog Samples
## DNS
@dns = Fog::DNS.new(:provider => 'Linode', :linode_api_key => LINODE_KEY)
if @zone = @dns.zones.all.find { |z| z.domain == ZONE }
puts "Found zone #{@zone.inspect}"
else
@zone = @dns.zones.create(:domain => ZONE, :email => ZONE_EMAIL)
puts "Creating zone #{@zone.inspect}"
end
@rubiojr
rubiojr / fog_kvm_create_from_template.rb
Created November 29, 2011 17:15
Create KVM guest using fog/libvirt and a QCOW2 template
require 'fog'
require 'net/ssh'
require 'net/scp'
def upload_file(host, user, password, source, dest, print_progress = true)
Net::SSH.start(host, user, :password => password) do |ssh|
puts "Uploading file... (#{File.basename(source)})"
ssh.scp.upload!(source, dest) do |ch, name, sent, total|
if print_progress
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active June 10, 2024 09:16
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@jmoe
jmoe / rabl_init.rb
Created August 21, 2012 18:36
Pretty print JSON from RABL
class PrettyJson
def self.dump(object)
JSON.pretty_generate(object, {:indent => " "})
end
end
# config/initializers/rabl_init.rb
Rabl.configure do |config|
# Commented as these are defaults
# config.cache_all_output = false
@skhatri
skhatri / reset_crowd_password.sql
Created January 3, 2013 03:32
bulk update crowd user password for md5 directory
update cwd_user set credential = concat('{MD5}',
utl_raw.cast_to_varchar2(utl_encode.base64_encode
(dbms_obfuscation_toolkit.md5 (input => utl_raw.cast_to_raw('password')))))
where directory_id = (select id from cwd_directory where lower_directory_name = 'user-md5-directory')
/