This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| # File: celeryconfig.py -*- Encoding: utf-8 -*- | |
| BROKER_BACKEND = 'beanstalk' | |
| BROKER_HOST = '127.0.0.1' | |
| BROKER_PORT = 11300 | |
| CELERY_IGNORE_RESULT = True | |
| CELERY_IMPORTS = ("tasks", ) |
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| # Usage: | |
| # source iterm2.zsh | |
| # iTerm2 tab color commands | |
| # https://iterm2.com/documentation-escape-codes.html | |
| if [[ -n "$ITERM_SESSION_ID" ]]; then | |
| tab-color() { | |
| echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
| echo -ne "\033]6;1;bg;green;brightness;$2\a" |
| !------------------------------------------------------------------------------- | |
| ! Xft settings | |
| !------------------------------------------------------------------------------- | |
| Xft.dpi: 96 | |
| Xft.antialias: false | |
| Xft.rgba: rgb | |
| Xft.hinting: true | |
| Xft.hintstyle: hintslight |
| Steps: | |
| 0. Checkout your git repo from the server (I use /var/www/carbonite) | |
| 1. Upload both of these files to the same directory on your server | |
| 2. chmod +x restart_node.sh | |
| 3. nohup node github_post_commit.js 2>&1 >> github_post_commit.log & | |
| 4. In the github admin for your repo, set a post commit hook to the url http://<your host>:8080/ | |
| 5. Make a commit to your repo | |
| 6. Point a browser at http://<your host>:8080/ and you should see the commit |
| upstream your-app { | |
| # fail_timeout=0 means we always retry an upstream even if it failed | |
| # to return a good HTTP response (in case the Unicorn master nukes a | |
| # single worker for timing out). | |
| server unix:/tmp/your_app.socket fail_timeout=0; | |
| } | |
| server { | |
| listen 80; |
| ; Sample supervisor config file. | |
| [unix_http_server] | |
| file=/tmp/supervisor.sock ; (the path to the socket file) | |
| ;chmod=0700 ; sockef file mode (default 0700) | |
| ;chown=nobody:nogroup ; socket file uid:gid owner | |
| ;username=user ; (default is no username (open server)) | |
| ;password=123 ; (default is no password (open server)) | |
| ;[inet_http_server] ; inet (TCP) server disabled by default |
| # -*- Encoding: utf-8 -*- | |
| import base64 | |
| import binascii | |
| import cgi | |
| import hashlib | |
| import hmac | |
| import logging | |
| import time | |
| import urllib | |
| import urlparse |
| # 適用於【鼠鬚管】0.9.13+ | |
| # 位置:~/Library/Rime/squirrel.custom.yaml | |
| # 用法:想要哪項生效,就刪去該行行首的#字符,但注意保留用於縮進的空格 | |
| patch: | |
| # us_keyboard_layout: true # 鍵盤選項:應用美式鍵盤佈局 | |
| # show_notifications_when: growl_is_running # 狀態通知,默認裝有Growl時顯示,也可設爲全開(always)全關(never) | |
| # style/horizontal: true # 候選窗横向顯示 | |
| # style/inline_preedit: false # 非內嵌編碼行 | |
| # style/font_face: "儷黑 Pro" # 我喜歡的字體名稱 |