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 strict; | |
$|++; | |
use IO::Socket::INET qw(CRLF); | |
use IO::Select; | |
use Getopt::Long; | |
$SIG{__WARN__} = sub { | |
warn map "[".localtime()."] $_\n", (join "", @_) =~ /(.+)\n*/g; |
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
colorscheme blue | |
set encoding=utf-8 | |
" enable syntax highlighting | |
syntax enable | |
" show line numbers | |
set number | |
" set tabs to have 4 spaces |
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
autodetach on | |
nethack on | |
deflogin on | |
term screen-256color | |
termcapinfo xterm* 'is=\E[r\E[m\E2J\E[H\E[?7h\E[?1;4;6l' | |
bind h hardcopy | |
hardcopy_append on | |
hardcopydir $HOME/capture |
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
b = { 0, 0, 0, 0, 0, 0, 0, 0 } | |
function byte_inc(b) | |
local c = 1 | |
for i = 1, 8 do | |
local new = (b[i] + c) % 0xFF | |
c = math.floor((b[i] + c) / 0xFF) | |
b[i] = new | |
if c == 0 then | |
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
--[[ | |
tcp_state.lua - Find TCP HALF_OPEN and HALF_CLOSE conditions. | |
Copyright (C) 2014 Mark Rogaski <[email protected]> | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
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
import akka.dispatch.Future._ | |
def getOrElseProduce(key: K, producer: => V): Future[V] = { | |
val f = empty[V]() | |
putIfAbsent(key, f) match { | |
case null => f completeWithResult producer | |
case value => value | |
} | |
} |
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
#!/opt/bin/python | |
# | |
# $Id: power.py,v 1.1 2002/02/15 07:42:30 wendigo Exp $ | |
# | |
import sys | |
import os | |
import cgi | |
import types | |
# |
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/perl -nl | |
@a=map{s/##//;s/CM/,/;$_}split(",",$_);$s->[$a[0]]{$a[1]}=[@a[2..4]];}continue{ | |
eof&&last;}$q=$i=0;@t=split(//,shift);while("!!"ne$q){($q,$t[$i],$_)=@{$s->[$q] | |
{$t[$i]}||die};$i+=(/R/?1:-1);if($i<0){$i++;unshift(@t,"");}}print@t;{ |