140702
-date +%y%m%d
20140702
-date +%Y%m%d
20140702155934
-date +%Y%m%d%H%M%S
2014.07.02
-date +%Y.%m.%d
2014-07-02
-date +%F
1404313240
-date +%s [seconds since 1970-01-01 00:00:00 UTC]
This file contains 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
server { | |
listen 80; | |
server_name forum.example.com; | |
root /var/www/example_forum/; | |
index index.php; | |
access_log /var/log/nginx/forum.example.access.log main; | |
error_log /var/log/nginx/forum.example.error.log; |
This file contains 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
server { | |
index index.php; | |
set $basepath "/var/www"; | |
set $domain $host; | |
# check one name domain for simple application | |
if ($domain ~ "^(.[^.]*)\.dev$") { | |
set $domain $1; | |
set $rootpath "${domain}"; |
This file contains 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
{ | |
"font_size": 15, | |
"ignored_packages": | |
[ | |
"Vintage", | |
"Markdown" | |
], | |
"open_files_in_new_window": false, | |
"soda_classic_tabs": true, | |
"soda_folder_icons": true, |
This file contains 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/bash | |
while getopts a:bc: flag; do | |
case $flag in | |
a) | |
opt_a=$OPTARG | |
;; | |
b) | |
opt_b=1 | |
;; |
This file contains 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 | |
service rsyslog stop | |
sed -i -e 's/^\$ModLoad imklog/#\$ModLoad imklog/g' /etc/rsyslog.conf | |
service rsyslog start |
This file contains 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
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
This file contains 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
ssh -D 9999 user@server | |
use socks 4\5, disable other proxy settings |
This file contains 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
fpm --force \ | |
-s dir \ | |
-t deb \ | |
--vendor dragolabs \ | |
--maintainer 'Vitaly Shishlyannikov <[email protected]>' \ | |
--deb-user root \ | |
--deb-group root \ | |
--url http://dragolabs.org \ | |
--version $VERSION \ | |
--iteration ddr`date +%y%m%d%H%M` \ |
This file contains 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
#!/usr/bin/env bash | |
set -o pipefail | |
set -o errexit | |
# set -o xtrace | |
__DIR__="$(cd "$(dirname "${0}")"; echo $(pwd))" | |
__BASE__="$(basename "${0}")" | |
__FILE__="${__DIR__}/${__BASE__}" |
OlderNewer