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
foo |
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
object Universe extends App { | |
val proc = new RequestProcessor() | |
val service_proc = new thrift.LocRequestService.Processor(proc) | |
val serverTransport: TServerTransport = new TServerSocket(MY_PORT); | |
val server: TServer = new TSimpleServer(new TServer.Args(serverTransport).processor(service_proc)); | |
// ... | |
server.serve(); |
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
package org.jarsonmar.neptune.universe | |
import akka.actor._ | |
import akka.util._ | |
import org.apache.thrift.TException | |
import org.apache.thrift.server._ | |
import org.apache.thrift.transport._ | |
import org.apache.thrift.protocol._ | |
import collection.mutable |
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 | |
require 'tempfile' | |
file = Tempfile.new('rails-trace'); | |
ARGF.each do |line| | |
fields = line.chomp.strip.split(/\s+/, 3) | |
next unless fields.size >= 3 | |
if fields[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/env perl | |
use strict; | |
use warnings; | |
sub return_eval { | |
return eval { die } or do { die "does not get to here" }; | |
} | |
return_eval(); |
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 strict; | |
use warnings; | |
use Term::ReadLine; | |
use IO::Socket::INET; | |
# ABSTRACT: A hacky modal 'telnet' client | |
# | |
# This is written to replace 'rlwrap telnet foo' | |
# so I can have my own custom keybindings. At the time |
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
use Foo::Baz; | |
class Foo { | |
method hello() { Foo::Baz.new.bop() } | |
} |
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
sub attr_unpack { | |
shift if ref($_[0]); # called in object context, ditch the object | |
my $data = shift; | |
my ($num, $fg, $bg, $bo, $fa, $st, $ul, $bl, $rv); | |
$num = unpack ('S', $data); | |
($fg, $bg, $bo, $fa, $st, $ul, $bl, $rv) = ( | |
$num & 7, | |
($num >> 4) & 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
#!/bin/bash | |
BREWBIN=/Users/jasonmay/.brew/bin | |
GROWLHOST=$1 | |
( | |
/usr/bin/ssh "$GROWLHOST" "cat .growl-alerts 2>/dev/null; rm -f .growl-alerts" && echo | |
) | while read msg | |
do |
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
use Irssi; | |
use vars qw($VERSION %IRSSI); | |
$VERSION = "0.01"; | |
%IRSSI = ( | |
authors => "Jason May", | |
contact => '[email protected]', | |
name => 'alertsfile', | |
description => 'Send all hilight messages to a file for external apps to process', | |
license => "Public Domain", | |
url => "http://irssi.org/", |
NewerOlder