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/local/bin/ruby | |
# First stab at a svn log watcher for user ohnojoe. | |
# SvnRecord also allows you to easily extend the script to match on certain file names/package names | |
# that you want to watch. | |
SVN_CMD = 'svn log -l 30 -v https://my.svn.server.com/Project/branches/' | |
FILE_MATCH = '\/branches\/.*' | |
USERS_WATCHED = %w{ ohnojoe } |
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
def parse_command( command_ary ) | |
o = "" | |
command_ary.each do |l| | |
o = o + l.slice(60..-1).chomp | |
end | |
o.gsub!('><', ">\n<") | |
o_ary = o.split("\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
function onDeviceReady() | |
{ | |
console.log('********************************* onDeviceReady'); | |
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail); | |
} | |
function onBodyLoad() | |
{ | |
console.log('********************************* onBodyLoad'); |
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 'rubygems' | |
require 'snmp' | |
include SNMP | |
def snmp_get( oid ) | |
varbind = VarBind.new(oid) | |
response = @manager.get([varbind]) | |
response.each_varbind do |vb| |
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
var man = (function() { | |
var m_that = {}; | |
var photo_prototype = function(spec, my) { | |
var that = {}; | |
var my = my || {}; | |
that.obj_name = "photo_proto"; | |
var get_name = function () { |
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 'fileutils' | |
def unzip_dir(dir) | |
FileUtils.cd(dir) | |
top = Dir['*.zip'] | |
top.each do |x| | |
if x.match(/.*\.zip\Z/) | |
begin | |
#puts "unzipping " + x |
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
var mixinObjectFunctions = function(obj) { | |
for( var propName in obj) { | |
if(solContext.hasOwnProperty(propName)) { | |
if(typeof obj[propName] === 'function') { | |
that[propName] = obj[propName]; | |
console.log("that." + propName + " : " + typeof that[propName]); | |
} | |
} | |
} | |
}; |
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
# itunes_service.rb | |
require 'sinatra' | |
require 'json' | |
require './applay' | |
get '/music/play' do | |
ItunesAppScript.new.play | |
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
require 'test/unit' | |
require 'palindrome' | |
require 'awesome_print' | |
class PalindromeTest < Test::Unit::TestCase | |
SAS_P = "sas" | |
def setup | |
end |
OlderNewer