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
# Output with command | |
# git log --format="//%h/%ae/%ai/%s" --name-only --relative="iChart ASP.net/" -- iChart ASP.net/ | |
# | |
class GitBrowseInfo | |
def initialize(str) | |
@str = str | |
end | |
def parse |
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/ruby | |
# Usage: | |
# ruby extract_l.rb cc.csv ids.txt > new_cc.csv | |
lines = IO::readlines(ARGV[0]).map {|x| x.chomp! } | |
ids = IO::readlines(ARGV[1]).map {|x| x.chomp! } | |
lines.shift |
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 | |
# Author: Vitalie Lazu | |
# Date: Mon, 21 Sep 2009 17:59:50 +0300 | |
# | |
# Starling status plugin for nagios | |
require 'rubygems' | |
# needs memcache-client gem | |
require "memcache" | |
require 'optparse' |
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 'svn/info' | |
repo = 'sa_cp33' | |
rev = 19 | |
path = nil | |
for i in 1..6 | |
path = "/var/svn#{i}/#{repo}" | |
if test ?d, path | |
break |
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
# collect information about a running process | |
# ruby debug.rb <pid> | |
begin | |
raise ArgumentError unless pid = ARGV[0] | |
pid = pid.to_i | |
raise ArgumentError unless pid > 0 | |
Process.kill(0,pid) | |
rescue TypeError, ArgumentError | |
raise 'pid required' |
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 | |
# Script to help with rails migrations | |
cmd = "rake db:migrate" | |
rev = ARGV[0].to_i | |
if rev > 0 | |
cmd << " VERSION=#{rev}" |
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 | |
# Author: Vitalie L | |
# Simple replacer to bundler gem | |
# Sample config file | |
=begin | |
rails,2.2.3 | |
rcov | |
rdiscount | |
uuidtools,1.0.7 |
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/perl | |
# Usage: $0 [email protected] | |
$REGEXP = shift || die "no email-adress given (regexp-style, e.g. bl.*\@yahoo.com)!"; | |
@data = qx</usr/sbin/postqueue -p>; | |
for (@data) { | |
if (/^(\w+)(\*|\!)?\s/) { | |
$queue_id = $1; |
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/ruby | |
# Convert videos to mp4 for my TV | |
def convert(ext) | |
# ext = "ogv" | |
files = Dir["*.#{ext}"] | |
files.each do |file| | |
out = "#{file.gsub(/#{ext}$/, '')}mp4" |
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
# gerrit.config for custom gitweb | |
[gitweb] | |
type = custom | |
url = http://www.assembla.com/code/ | |
revision = ${project}/git/nodes/?rev=${commit} | |
project = ${project}/git/nodes/ |