Skip to content

Instantly share code, notes, and snippets.

View srounet's full-sized avatar

srounet

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@srounet
srounet / delegated
Last active December 28, 2015 12:29
Delegated rc.d for FreeBSD 9.1
#!/bin/sh
. /etc/rc.subr
name="delegated"
rcvar=delegated_enable
load_rc_config ${name}
: ${delegated_pidfile="/var/run/delegated/delegated.pid"}
max=15
@srounet
srounet / FREEBSD_9_2_TIMEZONE
Created July 7, 2013 15:48
Freebsd set timezone
$> date
dim 7 jul 2013 15:48:19 CEST
$> cd /usr/share/zoneinfo/Europe
$> cp Paris /etc/localtime
$> date
dim 7 jul 2013 17:48:19 CEST
@srounet
srounet / FREEBSD_9_1_Mapnik_2_2_0
Last active December 18, 2015 17:19
FREEBSD_9_1_Mapnik_2_2_0
https://github.com/mapnik/mapnik/wiki/FreeBSDInstallation
$> cd /usr/ports/print/freetype2/
$> make install clean distclean
$> cd /usr/ports/devel/icu/
$> make install clean distclean
$> cd /usr/ports/graphics/jpeg
$> make install clean distclean
@srounet
srounet / test_haproxy.py
Created March 28, 2013 13:25
Test Haproxy
#!/usr/bin/env python
import urllib2
import json
html = urllib2.urlopen('http://www.jsonip.com').read()
print "Normal ip: %s" % json.loads(html)['ip']
proxy_support = urllib2.ProxyHandler({"http":"http://127.0.0.1:8123"})
opener = urllib2.build_opener(proxy_support)
@srounet
srounet / FREEBSD_9_1_EMACS_HTOP_MONGODB_ARBITRER
Last active December 15, 2015 09:49
FREEBSD_9_1_EMACS_HTOP_MONGODB_ARBITRER
# VMWare 9
# Freebsd 9.1 Bootimage
# Network: Bridged
# DHCP: Auto
# Disk: 5.0 Go
# Ram: 128.0 Mo
# AllocateFullDiskSpace: Yes
#Disable rsyslog listen
echo "yslogd_flags=\"-s -s\" >> /etc/rc.conf
@srounet
srounet / FREEBSD_9_1_EMACS_HTOP_MONGODB_DB2
Last active December 15, 2015 08:39
FREEBSD_9_1_EMACS_HTOP_MONGODB_DB2
# VMWare 9
# Freebsd 9.1 Bootimage
# Network: Bridged
# DHCP: Auto
# Disk: 250.0 Go
# Ram: 1.0 Go
# AllocateFullDiskSpace: Yes
# SplitFile: Yes
#Disable rsyslog listen
@srounet
srounet / FREEBSD_9_1_EMACS_HTOP_MONGODB_DB1
Last active December 15, 2015 08:29
FREEBSD_9_1_EMACS_HTOP_MONGODB_DB1
# VMWare 9
# Freebsd 9.1 Bootimage
# Network: Bridged
# DHCP: Auto
# Disk: 250.0 Go
# Ram: 2.0 Go
# AllocateFullDiskSpace: Yes
# SplitFile: Yes
#Disable rsyslog listen
@srounet
srounet / config
Last active December 15, 2015 08:19
polipo configuration
socksParentProxy = "127.0.0.1:9049"
proxyAddress = "0.0.0.0"
proxyPort = 8123
#diskCacheRoot = ""
@srounet
srounet / tor
Created March 23, 2013 23:03
Tor rc.d for FreeBSD 9.1
#!/bin/sh
# $FreeBSD: branches/RELENG_9_1_0/security/tor/files/tor.in 300897 2012-07-14 14:29:18Z beat $
. /etc/rc.subr
name="tor"
rcvar=tor_enable
load_rc_config ${name}
: ${tor_user="_tor"}
: ${tor_datadir="/var/db/tor"}