Skip to content

Instantly share code, notes, and snippets.

@pguth66
pguth66 / gist:5045866
Created February 27, 2013 07:09
exporting SS metadata
#!/bin/sh
dstamp=`date "+%F-%T"`
bkupdir=/var/tmp/$0-$dstamp
mkdir -p $bkupdir && cd $bkupdir
for d in zone block machine device zone_design block_design machine_design
do
echo -n "backing up $d records..."
ocs $d list | grep -v ID | sort | uniq | grep -v "^ *$" | cut -f 3 -d " " | while read f ; do
@pguth66
pguth66 / gist:3350976
Created August 14, 2012 17:20
Ruby meets rock!
#!/usr/bin/ruby
class Me
def leppard ; self.pour("some sugar") ; end
def pour(substance)
puts "Pour " + substance + " on me"
end
class Kid
def initialize(name)
@name = name
@score = 0
end
def getapoint
@score += 1
end