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 'rticulate' | |
require 'thin/prefork' | |
require 'thin/prefork/project' | |
require 'projectr/watch_changes' | |
debugging = ARGV.member?("-d") | |
if debugging then | |
stderr=$stderr.dup |
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
stargreen@lsip:~$ /usr/local/bin/rvm-installer --version 1.2.0 | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 703k 100 703k 0 0 250k 0 0:00:02 0:00:02 --:--:-- 280k | |
Unrecognized option: --path | |
Usage: | |
./scripts/install [options] |
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
TARGET_HOSTNAME=golden | |
TEMPLATE=template | |
RELEASE=squeeze | |
PROXY=http://lsip.4a.telent.net:3142 | |
MIRROR=$(PROXY)/ftp.debian.org/debian | |
# this must be in a format that works as input to sfdisk | |
PARTITIONS='1,1044,L,*\n1045,243\n1288,\n;' | |
all: checkuid0 disk.img |
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
# gist has no puppet syntax highlighting? shurely shome mishtake | |
# Faced with the choice of writing down in English how I installed redmine so that | |
# A N Other admin could repeat it at a later date, or writing down in Puppet | |
# syntax how I would propose to install it, I went for the latter option and | |
# now I can repeat it at any date I like. Oh, let's run it again! | |
# This works for me. If you have the Debian Squeeze versions of ruby and puppet, | |
# it may also work for you. If it breaks, you get to keep both halves. I used |
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
wsrv() { ruby -r sinatra -e "a=ARGV;;enable :run; set :port, ((i=a.index('-p') and a.slice!(i,2)[1].to_i)||8000); set :public, File.join(Dir.pwd,a[0]||'.'); get '/' do Sinatra::VERSION ; 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
:; export PATH=/usr/local/rbx/bin/:/home/dan/scripts:/home/dan/bin:/usr/local/lib/android/tools:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin | |
:; type ruby | |
ruby is /usr/local/rbx/bin/ruby | |
:; echo $GEM_HOME | |
/home/dan/gem | |
:; rm Gemfile.lock | |
:; bundle install | |
Fetching source index for http://rubygems.org/ | |
Using rake (0.9.2.2) | |
Using log4r (1.1.9) |
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
irb(main):025:0> class Foo; def foo; 42 ;end ; alias :bar :foo ;end | |
=> nil | |
irb(main):026:0> Foo.instance_method(:foo) | |
=> #<UnboundMethod: Foo#foo> | |
irb(main):027:0> Foo.instance_method(:bar) | |
=> #<UnboundMethod: Foo#foo> | |
irb(main):028:0> Foo.instance_method(:foo).name | |
=> :foo | |
irb(main):029:0> Foo.instance_method(:bar).name | |
=> :bar |
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
(ns onelouder.core | |
(:import [org.jaudiotagger.audio AudioFileIO] | |
[org.jaudiotagger.tag FieldKey])) | |
(defn tags [file] | |
(let [fields (apply conj {} (map (fn [n] [(keyword (. (. n toString) toLowerCase)) n]) (. FieldKey values))) | |
tag (. file (getTag))] | |
(apply conj {} | |
(filter (fn [[name val]] (and val (not (empty? val)))) | |
(map (fn [[name val]] |
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
$ cat connectivity.pl | |
#!/usr/bin/perl | |
open(P,"ping dean.stargreen.com|"); | |
my $verbose=grep(@ARGV,"-v"); | |
#warn $verbose; | |
$|++; while(<P>){ | |
my($seq)=/icmp_req=(\d+)/ ; | |
print $_ if $verbose; | |
while($seq>$expected){ | |
print ((scalar gmtime)." missed $expected\n"); |
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
DIRS=SOURCES SPECS BUILD BUILDROOT RPMS SRPMS workarea | |
SPEC=mongodb.spec | |
VERSION=2.2.1 | |
UPSTREAM=http://downloads.mongodb.org/src/mongodb-src-r$(VERSION).tar.gz | |
TARBALL=$(shell basename $(UPSTREAM)) | |
all: $(DIRS) | |
@echo "ready" | |
distclean: |