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
version="2.14.0" | |
requires(mt) = "threads" | |
requires(mt,mt_vm) = "threads.vm" | |
requires(mt,mt_posix) = "threads.posix" | |
directory="+lablgtk2" | |
archive(byte) = "lablgtk.cma" | |
archive(native) = "lablgtk.cmxa" | |
archive(byte,mt) += "gtkThread.cmo" | |
archive(native,mt) += "gtkThread.cmx" |
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 perl | |
=head1 NAME | |
nextrip.pl - NexTrip query tool | |
=head1 SYNOPSIS | |
B<nextrip.pl> [I<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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
# get these with `yum install perl-RPM2 perl-Number-Bytes-Human' | |
use RPM2; | |
use Number::Bytes::Human qw{format_bytes}; | |
my $db = RPM2->open_rpm_db(); |
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 needState(need: InfoNeed) = { | |
object needs extends Obj('needs) { | |
object thisNeed extends Obj(Symbol(need.name)) { | |
val state = Child[String, Property[String]](Some(this), UserProps.Need.state) | |
} | |
} | |
js match { | |
case needs.thisNeed.state(st) => Some(st) | |
case _ => None | |
} |
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
// Launch a terminal in the buffer's current directory. | |
terminalCommand = "gnome-terminal"; | |
dir = buffer.getDirectory(); | |
cmd = new String[]{terminalCommand, "--working-directory=" + dir}; | |
Runtime.getRuntime().exec(cmd); |
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/sh | |
for file in "$@"; do | |
outfile="${file%%.pdf}.jpg" | |
echo "Thumbnailing $file to $outfile" | |
convert -resize 300 "$file[0]" "$outfile" | |
done |
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 perl | |
use warnings; | |
use strict; | |
use RPM2; | |
use Getopt::Std; | |
my %opts; | |
getopts("c", \%opts) or exit 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
trait InfoNeed { | |
type DataType | |
/** Get the web request to fetch data */ | |
def request: WebRequest[DataType] | |
/** Get the neighbors from some fetched data (to determine new nodes to visit) */ | |
def neighbors(data: DataType): Traversable[Node] | |
/** Save the data to the data store. */ | |
def save(store: DataStore, data: DataType) | |
} |
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
trait InfoNeed { | |
type DataType | |
/** Get the web request to fetch data */ | |
def request: WebRequest[DataType] | |
/** Get the neighbors from some fetched data */ | |
def neighbors(data: DataType): Traversable[Node] | |
/** Save the data to the data store. */ | |
def save(store: DataStore, data: DataType) | |
} |
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 fetch[T](req: WebRequest[T]): Result[T] | |
def process(need: Need) { | |
val req = need.request | |
val res = fetch(req) | |
// now we save the data | |
res match { | |
case Good(data) => need.save(store, data) | |
/* error cases */ | |
} |
OlderNewer