This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -module(dispatcher). | |
| -export([dispatch/2]). | |
| dispatch(_, []) -> none; | |
| dispatch(Req, [{Regexp, Handler}|T]) -> | |
| "/" ++ Path = Req:get(path), | |
| Method = Req:get(method), | |
| Match = re:run(Path, Regexp, [global, {capture, all_but_first, list}]), | |
| case Match of | |
| {match, [MatchList]} -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #user nobody; | |
| worker_processes 1; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #download paket | |
| ngaur() { | |
| cd ~/abs/aur/; | |
| curl -# https://aur.archlinux.org/packages/${1:0:2}/$1/$1.tar.gz | /bin/tar -xz ; | |
| } | |
| #kompilasi dan instalasi paket | |
| nginstall() { | |
| cd ~/abs/aur/$1 && makepkg -si; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| FILENAME=$(date +%F_%H%M%S_%N).png; | |
| URL=https://dl.dropboxusercontent.com/u/USER_ID_ANDA/scrot/$FILENAME; | |
| if [[ $# -eq 0 ]]; then | |
| import -window root /PATH_KE_FOLDER_DROPBOX/$FILENAME; | |
| elif [[ $# -eq 1 && $1=='a' ]]; then | |
| import /PATH_KE_FOLDER_DROPBOX/$FILENAME; | |
| fi | |
| echo $URL | xclip -selection clipboard; | |
| echo saved: $URL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # use imagemagick to take screenshot and sync automatically to Dropbox | |
| crot() { | |
| import -window root /home/bambang/Dropbox/Public/scrot/$(date +%F_%H%M%S_%N).png; | |
| } | |
| # same as above, but area-specific (select with mouse) | |
| crit() { | |
| import /home/bambang/Dropbox/Public/scrot/$(date +%F_%H%M%S_%N).png; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <IfModule mod_headers.c> | |
| Header set X-UA-Compatible "IE=edge,chrome=1" | |
| # `mod_headers` can't match based on the content-type, however, we only | |
| # want to send this header for HTML pages and not for the other resources | |
| <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$"> | |
| Header unset X-UA-Compatible | |
| </FilesMatch> | |
| </IfModule> | |
| <IfModule mod_autoindex.c> |
NewerOlder