$ ./imdb.rb "pee wee's big adventure" /tmp
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
# taken from http://snippets.dzone.com/posts/show/2265 | |
require 'fileutils' | |
module Daemon | |
WorkingDirectory = File.expand_path(File.dirname(__FILE__)) | |
class Base | |
def self.pid_fn | |
File.join(WorkingDirectory, "#{name}.pid") | |
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
#!/usr/bin/perl | |
use strict qw(subs vars); | |
my $counter; | |
while(<>) { | |
if(/^Dialogue: /) { | |
my ($start, $end, $text) = unpack("x12A10xA10x22A*", $_); | |
my ($hr, $min, $sec) = split(/:/, $start); |
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
#!/bin/bash | |
# screen_ssh.sh by Chris Jones <cmsj@tenshu.net> | |
# Released under the GPL v2 licence. | |
# Set the title of the current screen to the hostname being ssh'd to | |
# | |
# usage: screen_ssh.sh $PPID hostname | |
# | |
# This is intended to be called by ssh(1) as a LocalCommand. | |
# For example, put this in ~/.ssh/config: | |
# |
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 | |
require 'rubygems' | |
require 'nokogiri' | |
text="<html><body><div class='body'><p class='main'>some text here</p></div></body></html>" | |
doc = Nokogiri::HTML(text) | |
root = doc.root | |
node = doc.xpath('//p[@class="main"]').first | |
path = [node] |
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 | |
=head1 NAME | |
wg.pl | |
=head1 AUTHOR | |
Matteo Redaelli |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define NoOfFILES 16384 | |
int main() | |
{ | |
char filename[10]; | |
FILE *fds[NoOfFILES]; | |
int i; |
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 -w | |
# | |
# nicstat - print network traffic, Kbyte/s read and written. | |
# Solaris 8+, Perl (Sun::Solaris::Kstat). | |
# | |
# "netstat -i" only gives a packet count, this program gives Kbytes. | |
# | |
# 30-Sep-2006, ver 1.00 (check for new versions, http://www.brendangregg.com) | |
# | |
# USAGE: nicstat [-hsz] [-i int[,int...]] | [interval [count]] |
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 | |
$INQ = "/net/ironchef/var/tmp/pkgs/linux/inq.linux"; | |
#$INQ = "/net/goober/scratch/inq/inq"; | |
$HEAD = 1; | |
while (@ARGV) | |
{ | |
$arg = shift @ARGV; | |
if ($arg eq "-emc") { $EMC = 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/perl -w | |
use Getopt::Std; | |
getopt('dig', \%opts); | |
die("\nUsage: $0 -d <file with disks to add> -i <file with inq output> -g <diskgroup name>\n\n") | |
unless (defined $opts{d} && $opts{i} && $opts{g}); | |
OlderNewer