Skip to content

Instantly share code, notes, and snippets.

View gist:1a35b380bac510ad8795
#!/bin/bash
#
# chkconfig: 23 90 10
# Description: Quickly hacked together bigcouch init script for CentOS systems.
. /etc/init.d/functions
PID_FILE=/var/run/bigcouch.pid
BIGCOUCH_BIN=/opt/bigcouch/bin/bigcouch
SUBSYS_LOCK_FILE=/var/lock/subsys/bigcouch
View ssh_client.py
#!/usr/bin/env python
import paramiko
hostname = '192.168.1.1'
port = 22
username = 'foo'
password = 'xxxYYYxxx'
if __name__ == "__main__":
View tcp-proxy.py
#!/usr/bin/env python
# coding: utf-8
# http://musta.sh/2012-03-04/twisted-tcp-proxy.html
import sys
from twisted.internet import defer
from twisted.internet import protocol
from twisted.internet import reactor
from twisted.python import log
@mike-zhang
mike-zhang / extensions.lua
Created Dec 7, 2012 — forked from igmar/extensions.lua
Asterisk LUA dialplan
View extensions.lua
require("lsqlite3")
-- Igmar: Wanneer closen we dat DB object eigenlijk ?
db = sqlite3.open('/etc/asterisk/users.sqlite')
--CONSOLE = "Console/dsp" -- Console interface for demo
--CONSOLE = "DAHDI/1"
--CONSOLE = "Phone/phone0"
TRUNK = "DAHDI/G1"
@mike-zhang
mike-zhang / netfwd.go
Created Oct 8, 2012 — forked from wallrat/proxy.go
Simple GO TCP proxy
View netfwd.go
// can be run in go 1.0.3
// build : go build netfwd.go
package main
import (
"net"
"fmt"
"io"
"os"
)