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
| ###################### | |
| # Options | |
| ###################### | |
| NULL= | |
| REVEAL_ARCHIVE_IN_FINDER=false | |
| FRAMEWORK_NAME="${PROJECT_NAME}" | |
| SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework" |
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/bash | |
| set -e | |
| if [ -z "$(which brew)" ]; then | |
| echo "This script requires Homebrew." | |
| exit | |
| fi | |
| if [ -z "$VIRTUAL_ENV" ]; then |
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
| [Unit] | |
| Description=supervisord - Supervisor process control system for UNIX | |
| Documentation=http://supervisord.org | |
| After=network.target | |
| [Service] | |
| Type=forking | |
| ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf | |
| ExecReload=/usr/bin/supervisorctl reload | |
| ExecStop=/usr/bin/supervisorctl shutdown |
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/bash | |
| ########### | |
| # add crontab | |
| # 0 0 1 * * /root/src/renew_ssl_cert.sh <site> 2>>/var/log/acme_tiny.log | |
| ########### | |
| site=$1 | |
| domains=$2 | |
| if [ -n "${domains}" ]; then | |
| # init |
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/bash | |
| # /etc/nginx/ssl/<site>/ | |
| site=$1 | |
| # DNS:www.abc.xyz,DNS:xyz.abc.xyz | |
| domains=$2 | |
| OPENSSL_CNF=/etc/pki/tls/openssl.cnf | |
| ssl_dir=/etc/nginx/ssl | |
| mkdir -p ${ssl_dir} |
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
| set -g prefix ^a | |
| unbind ^b | |
| bind a send-prefix | |
| set -g mode-keys vi | |
| set -g status-utf8 on | |
| setw -g utf8 on | |
| # window select. | |
| bind-key -n F1 previous-window |
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
| " vimrc | |
| " | |
| " Maintainer: webee.yw <[email protected]> | |
| " Last change: 2013.11 | |
| " | |
| " 使用vim的配置,必须放在最前面,会对其它设置产生影响 | |
| set nocompatible | |
| let mapleader = "," |
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/bash | |
| if [ "$1" == '.' ];then | |
| shift; | |
| exec tmux $* | |
| exit 0 | |
| fi | |
| name=$1 | |
| n=$2 | |
| if [ "$name" == "" ];then |
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
| function pathmunge { | |
| if echo $PATH | /usr/bin/egrep -q "(^|:)$1($|:)";then | |
| a=${1//\//\\\/} | |
| PATH=$(echo $PATH|/usr/bin/sed -e "s/\([:^]*\)$a\([$:]*\)/\1\2/g") | |
| PATH=$(echo $PATH|/usr/bin/sed -e 's/::/:/g'|/usr/bin/sed -e 's/^://g'|/usr/bin/sed -e 's/:$//g') | |
| fi | |
| if [ "$2" = "after" ];then | |
| PATH=$PATH:$1 | |
| else | |
| PATH=$1:$PATH |
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
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |