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 main | |
import ( | |
"database/sql" | |
"errors" | |
"fmt" | |
_ "github.com/bmizerany/pq" | |
"os" | |
"regexp" | |
"strings" |
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 nettimeout | |
import ( | |
"net" | |
"time" | |
) | |
// Listener wraps a net.Listener, and gives a place to store the timeout | |
// parameters. On Accept, it will wrap the net.Conn with our own Conn for us. | |
type Listener struct { |
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 main | |
import ( | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"code.google.com/p/go.crypto/ssh" | |
"code.google.com/p/go.crypto/ssh/terminal" |
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
""" | |
Utility (Linux only) to ensure subprocesses exit when their parents do by sending | |
a specified signal when the parent dies. | |
Usage: | |
subprocess.Popen(['some-executable'], preexec_fn=on_parent_exit('SIGHUP')) | |
""" | |
import signal |
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
/* Copyright (C) 2011 Intel Corporation | |
Author: Andi Kleen | |
Set 2.6.x personality | |
uname26 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; version | |
2. | |
uname26 is distributed in the hope that it will be useful, |