Public Gists by bensie

Gravatar
Sat Oct 03 10:31:28 -0700 2009
1
2
3
root@shiver:~# sfdisk --list /dev/shiver/24-test
 
Disk /dev/shiver/24-test: 16187 cylinders, 255 heads, 63 sectors/track
Gravatar
Thu Oct 01 15:06:27 -0700 2009
1
2
3
# Add partition mappings
kpartx -av /dev/lvgroup/lvname
 
Gravatar
Tue Sep 29 22:19:56 -0700 2009
1
2
3
# Disable(0)/enable(1) sudden motion sensor on OS X
 
sudo pmset -a sms 0
Gravatar
Sat Sep 12 16:00:15 -0700 2009
1
2
3
namespace :db do
  desc "Add questions to the database"
  task :add_questions => :environment do
Gravatar
Tue Aug 25 16:51:09 -0700 2009
1
2
3
require 'rubygems'
require 'net/ssh'
 
Gravatar
Tue Aug 25 15:31:04 -0700 2009
1
2
3
~vp(master)> cat ~/.gitconfig
...SNIP...
[alias]
Gravatar
Tue Aug 25 15:28:12 -0700 2009
1
2
3
[user]
  name = Scott Chacon
  email = schacon@gmail.com
Gravatar
Mon Aug 24 12:03:45 -0700 2009
1
2
3
File.open('osi.txt') do |file|
  File.open('output.txt', 'w') do |out|
    while line = file.gets
Gravatar
Sun Aug 23 23:30:43 -0700 2009
1
2
3
Poor Man's Deploy
=================
 
Gravatar
Mon Aug 10 17:45:18 -0700 2009
1
2
3
guys = Array.new
guys << { :name => "James", :title => "Cool Guy" }
guys << { :name => "JD", :title => "Stupid Guy" }
Gravatar
Mon Aug 03 16:26:26 -0700 2009
1
2
3
servers:
  server1-name:
    username: jd
Gravatar
Mon Aug 03 16:15:31 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
require 'rubygems'
Gravatar
Fri Jul 31 18:57:06 -0700 2009
1
2
3
<div class="batch-buttons-bg">
  <div class="batch-button-right"></div>
  <div class="batch-button-left inactive-left"></div>
Gravatar
Wed Jul 08 14:17:04 -0700 2009
1
2
3
function preloadImages() {
  var images = [ "popup-fill.png", "popup-topcap.png", "popup-bottomcap.png", "popup-icons.png", "ac-results-bottomcap.png",
                 "ac-results-topcap.png", "ac-results-fill.png", "ac-results-more-over.png", "ac-results-more.png",
Gravatar
Wed Jul 08 12:06:10 -0700 2009
1
2
3
# $ tweet Hi mom!
#
# Put this in ~/.bashrc or wherever.
Gravatar
Mon Jun 22 10:27:13 -0700 2009
1
2
3
require 'ftools'
100.times do |n|
  File.copy("test.txt", "test-#{n}.txt")
Gravatar
Fri Jun 19 06:43:33 -0700 2009
1
2
3
# Bash snippet to open new shells in most recently visited dir.
# Useful if you want to open a new terminal tab at the present
# tab's location.
gist: 131920 HTML table using divs, no t...
Gravatar
Thu Jun 18 07:28:43 -0700 2009
1
2
3
<html>
<head>
<title>Test</title>
Gravatar
Wed Jun 17 15:47:32 -0700 2009
1
2
3
$('#statement-items tr').hover(function() {
  $(this:first).find("div").addClass('status-bg-hover');
}, function() {
Gravatar
Tue Jun 16 12:13:28 -0700 2009
1
2
3
U.S. states must be sent as their full capitalized name, those from the following list are valid:
  'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'District Of Columbia',
  'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland',