I hereby claim:
- I am alanbriolat on github.
- I am alanbriolat (https://keybase.io/alanbriolat) on keybase.
- I have a public key whose fingerprint is 139D 86F0 095A E34A 4E82 AED9 4911 5981 D488 B8BB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
program pointer_remap | |
type :: real_pointer | |
real, pointer :: p => null() | |
end type real_pointer | |
real, target, dimension(1:3) :: vec | |
type(real_pointer), dimension(-1:1) :: pVec | |
integer :: i |
import logging | |
logging.basicConfig(level=logging.DEBUG) | |
class Foo(object): | |
def __init__(self): | |
self.bar = "hello" | |
def __getitem__(self, key): | |
return getattr(self, key) |
import traceback | |
import sys | |
def excepthook(type, value, tb): | |
for part in traceback.format_exception(type, value, tb): | |
for line in part.splitlines(): | |
logging.critical(line) | |
sys.excepthook = excepthook |
#!/usr/bin/env python2 | |
""" | |
Generate a script to create a multi-hop SSH connection. | |
Usage: sshroute.py [options...] HOST | |
Options: | |
-l SPEC, --local=SPEC Tunnel a port - local:via:remote | |
-r SPEC, --remote=SPEC Reverse tunnel a port - remote:via:local | |
-h HOST, --host=HOST Go via another host |
>>> ip = "192.168.75.10" | |
>>> a, b, c, d = map(int, ip.split('.')) | |
>>> a == 192 and b == 168 and 72 <= c <= 79 and 1 <= d <= 254 | |
True |
; Spawn fcgiwrap as the user owning the git repositories, with a socket writeable by nginx | |
[fcgi-program:fcgiwrap_gitolite] | |
command = /usr/sbin/fcgiwrap | |
user = gitolite | |
socket = unix:///var/run/supervisor/%(program_name)s.sock | |
socket_owner = gitolite:nginx | |
socket_mode = 0770 |
server { | |
listen 80; | |
server_name projects.hexi.co redmine.codescape.net; | |
root /home/alan/www/redmine.codescape.net/public; | |
include global/restrictions.conf; | |
location / { | |
try_files $uri @redmine_fcgi; | |
} |
-- A simple IRC bot using http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot | |
-- as a starting point | |
module HBot where | |
import Data.List | |
import Network | |
import System.IO | |
import System.Console.ANSI | |
import Control.Applicative ((<$)) | |
import Control.Monad.Reader hiding (join) |