This file contains hidden or 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 python | |
import os, sys, json | |
import paramiko | |
class Transfer: | |
def __init__(self, srcfile, dsthost, dstdir): | |
self.src_file = srcfile | |
self.dst_host = dsthost | |
self.dst_dir = dstdir |
This file contains hidden or 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
# Tab completion for scp/sftp/ssh based on ~/.ssh/config | |
complete -o default -o nospace -W "$(/usr/bin/ruby -ne 'puts $_.split(/[\s,]+/)[1..-1].reject { |h| h.match /\*|\?/ } if $_.match /^\s*Host[s]*\s+/' < ~/.ssh/config)" scp sftp ssh 2>/dev/null |
This file contains hidden or 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
< aaronw> so schrodinger and heisenberg are out driving in their car | |
< aaronw> they get stopped and the cop says to heisenberg (the driver) | |
< aaronw> "hey, do you know how fast you were going?" | |
< aaronw> heisenberg says " no, don't tell me! " | |
< aaronw> the cop says "90mph". heisenberg says "thanks a lot, now I'm lost, asshole" | |
< aaronw> the cop, being suspicious, also goes and looks in the trunk | |
< aaronw> and says "hey, do you realize you have a dead cat in here?" | |
< aaronw> schrodinger says "well, *NOW* we do" |
This file contains hidden or 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
Component Quantity Description Price | |
--------- -------- ----------- ------ | |
(Motherboard) 1 SuperMicro X9DRH-7F $ 628 | |
- 2 processors | |
- 16 DIMMs | |
- up to 512GB of registered DIMMs | |
- up to 128MB of unregistered DIMMs | |
- onboard LSI2208 HW RAID controller | |
- 8 x SAS 6Gb/s ports | |
- 2 x SATA 6Gb/s ports |
This file contains hidden or 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 python | |
import os | |
import sys | |
import json | |
import dns.message | |
from twisted.internet.protocol import DatagramProtocol | |
from twisted.internet import reactor | |
class LoopbackDNS(DatagramProtocol): |
This file contains hidden or 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 python | |
import os | |
import sys | |
import time | |
import sched | |
def jumpoff(arg=None): | |
print "[%f] It's the jumpoff! (%s)" % (time.time(), str(arg)) | |
return |
This file contains hidden or 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
# ipv4 only | |
def gethostbyaddr(ip) | |
Socket.gethostbyaddr(ip.split('.').map(&:to_i).pack('CCCC')).first rescue ip | |
end |
This file contains hidden or 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 LWP::UserAgent; | |
use HTTP::Request; | |
$city = shift || die "startoftheday <city> <state>"; | |
$state = shift || die "startoftheday <city> <state>"; | |
@time = localtime; | |
$year = $time[5] + 1900; |
This file contains hidden or 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
/* | |
* Copyright (c) 2006 Omachonu Ogali <[email protected]> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright |
This file contains hidden or 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 <string.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <net-snmp/net-snmp-config.h> | |
#include <net-snmp/net-snmp-includes.h> | |
#define ADMIN_UP 1 | |
#define ADMIN_DOWN 2 | |
#define ADMIN_REMOVED 3 |