Skip to content

Instantly share code, notes, and snippets.

View v1nc3ntlaw's full-sized avatar

Vincent Lin (Sheng-Je Lin) v1nc3ntlaw

View GitHub Profile
@v1nc3ntlaw
v1nc3ntlaw / heroku_nginx_301.conf
Created September 21, 2014 15:49
heroku-buildpack-php heroku-php-nginx -C nginx_app.conf redirect all http to https
# https://devcenter.heroku.com/articles/http-routing#heroku-headers
# http://wiki.nginx.org/HttpCoreModule#.24http_HEADER
# redirect all http to https with 301
if ( $http_x_forwarded_proto = http ) {
return 301 https://$host$request_uri;
}
@v1nc3ntlaw
v1nc3ntlaw / gist:327479
Created March 10, 2010 03:15
set fluxbox background wallpaper
http://old.fluxbox.org/docbook/en/html/chap-bg.html
Chapter 6. Desktop Backgrounds
Fluxbox, like Blackbox, just has two wrapper utilities for this - fbsetroot and fbsetbg. Let's see how they work.
fbsetroot is about the equivalent of xsetroot, which can set backgrounds as long as they're simple, like a solid color. fbsetroot can also set gradients.
fbsetbg is a wrapper that tries to find a suitable background-setting app and then tries to set the wallpaper using that app. You don't have to configure fbsetbg. It just uses the first app it can find.
Overriding theme backgrounds
@v1nc3ntlaw
v1nc3ntlaw / gist:327480
Created March 10, 2010 03:17
set debian startup auto login and startx
http://www.debianadmin.com/how-to-auto-login-and-startx-without-a-display-manager-in-debian.html
How to auto login and startx without a display manager in Debian
Posted by Admin on December 23rd, 2008
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
If you want to auto login and startx without a display manager in Debian use the one of the following method
@v1nc3ntlaw
v1nc3ntlaw / gist:327591
Created March 10, 2010 06:33
post files inside shell scripts and self extract
$ tar cvvf archive.tar *
$ echo 'uudecode -o- << "EOF" | tar xvv ' > shellscript
$ uuencode archive.tar archive.tar >> shellscript
$ echo 'EOF' >> shellscript
@v1nc3ntlaw
v1nc3ntlaw / mldonkey
Created August 13, 2010 05:15
mldonkey
# telnet mldonkey command-line
$ telnet localhost 4000
# view current downloads
$ vd
# show users currently uploading
$ uploaders
# check shared files for removal
@v1nc3ntlaw
v1nc3ntlaw / arch linux ror
Created August 13, 2010 05:42
arch linux nginx ror
# reference
# http://github.com/jnstq/rails-nginx-passenger-ubuntu
$ sudo pacman -S base-devel openssl readline zlib
$ mkdir pkgs && cd pkgs
$ wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
$ tar zxf ruby-enterprise-1.8.7-2010.02.tar.gz
$ cd ruby-enterprise-1.8.7-2010.02
$ sudo ./installer
$ Enter
@v1nc3ntlaw
v1nc3ntlaw / arch linux nginx php fastcgi
Created August 13, 2010 15:23
arch linux nginx php fastcgi
# reference
# http://library.linode.com/web-servers/nginx/php-fastcgi/debian-5-lenny#install_spawn_fcgi
# http://wiki.archlinux.org/index.php/Nginx
@v1nc3ntlaw
v1nc3ntlaw / arch linux ror php postgresql
Created August 13, 2010 21:04
arch linux ror php postgresql
# reference
# http://wiki.archlinux.org/index.php/PostgreSQL
@v1nc3ntlaw
v1nc3ntlaw / redis_init_script
Created April 18, 2011 11:39
redis_init_script
#!/bin/sh
REDIS_PORT=6379
REDIS_EXEC=/usr/local/bin/redis-server
REDIS_CLI=/usr/local/bin/redis-cli
REDIS_CONF=/etc/redis.conf
PIDFILE=/var/run/redis.pid
case "$1" in
@v1nc3ntlaw
v1nc3ntlaw / god
Created May 9, 2011 07:08 — forked from divineforest/god
god ubuntu init.d script
#!/bin/sh
### BEGIN INIT INFO
# Provides: god
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: God
### END INIT INFO