Skip to content

Instantly share code, notes, and snippets.

View jyc's full-sized avatar

jyc

View GitHub Profile
@jyc
jyc / nginx.conf
Created November 17, 2011 00:10
Addition to nginx.conf
## Compression
# src: http://www.ruby-forum.com/topic/141251
# src: http://wiki.brightbox.co.uk/docs:nginx
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
#!/bin/bash
xrandr --output DVI-1 --right-of DVI-0
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=ssh-add
Comment=Start ssh-add.
Exec=ssh-add "/home/jonathan/.ssh/id_rsa"
StartupNotify=false
Terminal=false
Hidden=false
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=GNOME-Do
Comment=Start GNOME-Do.
Exec=gnome-do
StartupNotify=false
Terminal=false
Hidden=false
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Pidgin
Comment=Start Pidgin.
Exec=pidgin
StartupNotify=false
Terminal=false
Hidden=false
## PHP syntax highlighting
## Modified by Jonathan Chan <jchan@icebrg.us> on November 17th, 2011
## Originally from http://pbxinaflash.net/source/nano/php.nanorc
##
syntax "php" "\.php$" "\.php[2345s]$" "\.phtml$"
#functions
color brightmagenta "([A-Za-z0-9])"
#numbers
color brightblue "[0-9]"
#special
@jyc
jyc / nanorc
Created November 18, 2011 01:22
## Sample initialization file for GNU nano.
##
## Please note that you must have configured nano with --enable-nanorc
## for this file to be read! Also note that this file should not be in
## DOS or Mac format, and that characters specially interpreted by the
## shell should not be escaped here.
##
## To make sure a value is disabled, use "unset <option>".
##
## For the options that take parameters, the default value is given.
@jyc
jyc / stop.sh
Created December 29, 2011 01:27 — forked from anonymous/stop.sh
#!/bin/bash
. common.sh
SLEEP_INT=10
send "say The server is shutting down in 10 seconds."
send "say Saving the map..."
send "save-all"
@jyc
jyc / stop.sh
Created December 29, 2011 01:28 — forked from anonymous/stop.sh
Minecraft stop.sh
#!/bin/bash
SLEEP_INT=10
SCREEN_NAME="mc"
AS_USER="craft"
send() {
su $AS_USER -c "screen -p 0 -S $SCREEN_NAME -X eval \"stuff '$1'\015\""
}
SCREEN_NAME="mc"
MC_DIR="~/craftbukkit"
JAR_NAME="craftbukkit.jar"
send() {
screen -p 0 -S $SCREEN_NAME -X eval "stuff '$1'\015"
}