Skip to content

Instantly share code, notes, and snippets.

@holys
holys / etcrc.conf.txt
Created September 17, 2012 08:08 — forked from anonymous/etcrc.conf.txt
my /etc/rc.conf
#
# /etc/rc.conf - configuration file for initscripts
#
# Most of rc.conf has been replaced by various other configuration
# files. See archlinux(7) for details.
#
# For more details on rc.conf see rc.conf(5).
#
DAEMONS=(syslog-ng dbus vboxdrv wicd !network crond slim )
@holys
holys / etclocale.gen.txt
Created September 17, 2012 08:12 — forked from anonymous/etclocale.gen.txt
my /etc/locale.gen
# Configuration file for locale-gen
#
# lists of locales that are to be generated by the locale-gen command.
#
# Each line is of the form:
#
# <locale> <charset>
#
# where <locale> is one of the locales given in /usr/share/i18n/locales
# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
@holys
holys / homedavid.xinitrc.txt
Created September 17, 2012 08:56 — forked from anonymous/homedavid.xinitrc.txt
my /home/david/.xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#eval 'dbus-launch --sh-syntax --exit-with-session'
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
@holys
holys / etcinittab.txt
Created September 17, 2012 08:58 — forked from anonymous/etcinittab.txt
my /etc/inittab
#
# /etc/inittab
#
# Runlevels:
# 0 Halt
# 1(S) Single-user
# 2 Not used
# 3 Multi-user
# 4 Not used
@holys
holys / homedavid.xbindkeysrc.txt
Created September 17, 2012 11:05 — forked from anonymous/homedavid.xbindkeysrc.txt
/home/david/.xbindkeysrc
"amixer set Master playback 1+"
m:0x0 + c:123
XF86AudioRaiseVolume
"amixer set Master playback 1-"
m:0x0 + c:122
XF86AudioLowerVolume
"amixer set Master toggle"
m:0x0 + c:121
#!/bin/bash
# author: koumm
# desc: auto vsftpd script
# date: 2010-07-30
# version: v1.1
# modify:
WEBROOT="/data1/htdocs/www.koumm.com"
FTP_PORT="3000"
@holys
holys / varlogmongodbmongod.log.txt
Created October 6, 2012 03:13 — forked from anonymous/varlogmongodbmongod.log.txt
/var/log/mongodb/mongod.log
Tue Sep 25 20:35:21
Tue Sep 25 20:35:21 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
Tue Sep 25 20:35:21
Tue Sep 25 20:35:22 [initandlisten] MongoDB starting : pid=7596 port=27017 dbpath=/var/lib/mongodb 32-bit host=ftp
Tue Sep 25 20:35:22 [initandlisten]
Tue Sep 25 20:35:22 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
Tue Sep 25 20:35:22 [initandlisten] ** see http://blog.mongodb.org/post/137788967/32-bit-limitations
Tue Sep 25 20:35:22 [initandlisten] ** with --journal, the limit is lower
Tue Sep 25 20:35:22 [initandlisten]
Tue Sep 25 20:35:22 [initandlisten] db version v2.2.0, pdfile version 4.5
@holys
holys / logon.sh.txt
Created October 8, 2012 02:35 — forked from anonymous/logon.sh.txt
logon.sh
#!/bin/sh
# Judge a user is logged on or not
#
user="$1"
if who | grep -w "$user">/dev/null
then
echo "$user is logged on "
else
echo "$user is NOT logged on"
@holys
holys / gist:3897371
Created October 16, 2012 05:34 — forked from lamengao/gist:1560715
dl.cuoluo.me nginx config
server {
listen 80;
server_name dl.cuoluo.me;
location / {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://dl.dropbox.com/u/1812807/dl.cuoluo.me/index.html;
if ($request_method = POST) {
@holys
holys / .rjsupplicant.sh.txt
Created October 20, 2012 12:41 — forked from anonymous/.rjsupplicant.sh.txt
./rjsupplicant.sh
#! /bin/bash
curDir=$(cd "$(dirname "$0")"; pwd);
arg="";
until [ $# -eq 0 ]
do
opt=$1;
if [ "${opt/ /}" != "$opt" ]; then
arg="$arg \"$opt\"";
else