celery -A app.celery worker
python app.py
$cat /usr/local/Cellar/redis/2.8.8/homebrew.mxcl.redis.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<dict> | |
<key>SuccessfulExit</key> | |
<false/> | |
</dict> |
(defun get-repo-url (arg) | |
(let* ((remote (if arg "upstream" (nth 2 (s-split "/" (magit-get-tracked-ref))))) | |
(remote-url (magit-get "remote" remote "url")) | |
(fragments (s-split "[:/@]/?/?" (s-chop-suffix ".git" remote-url)))) | |
(concat "http://" (s-join "/" (cdr fragments))))) | |
(defun open-in-repo (arg) | |
(interactive "P") | |
(let* ((url (get-repo-url arg)) | |
(branch (if arg "master" (magit-get-current-branch))) |
<Python Webๅผๅๅฎๆ>
โฏ ps -ef | grep openvpn | |
0 35727 1 0 1:48PM ?? 0:00.07 /Applications/Tunnelblick.app/Contents/Resources/openvpn/openvpn-2.2.1/openvpn --daemon --log /Library/Application Support/Tunnelblick/Logs/-SLibrary-SApplication Support-STunnelblick-SShared-Sdouban.tblk-SContents-SResources-Sconfig.ovpn.9_0_3_1_305.1337.openvpn.log --cd /Library/Application Support/Tunnelblick/Shared/douban.tblk/Contents/Resources --config /Library/Application Support/Tunnelblick/Shared/douban.tblk/Contents/Resources/config.ovpn --cd /Library/Application Support/Tunnelblick/Shared/douban.tblk/Contents/Resources --management 127.0.0.1 1337 --management-query-passwords --management-hold --script-security 2 --up /Applications/Tunnelblick.app/Contents/Resources/client.2.up.tunnelblick.sh -w -d -f -ptADGNWradsgnw --down /Applications/Tunnelblick.app/Contents/Resources/client.2.down.tunnelblick.sh -w -d -f -ptADGNWradsgnw | |
501 35772 92964 0 1:49PM ttys007 0:00.00 grep openvpn | |
โฏ ping 10.8.0.1 | |
PING 10.8.0.1 (10.8.0.1): |
# coding=utf-8 | |
# Note: | |
# 1. ไฝฟ็จRedis็ผๅญ็จๆทไฟกๆฏ๏ผๅๅฐ้ๅค่ฐ็จ | |
# 2. ๅช้่ฟ็จๆท็locationๅญๆฎต็ๆฏๅฆๅ ๅซbeijingใshanghaiใguangzhouใ | |
# shenzhenใchina่ฟๅ ไธชๅ ณ้ฎ่ฏๅคๆญๆฏๅฆๆฏๅฝไบบ | |
from collections import defaultdict | |
import redis | |
import requests | |
USENAME = '<YOUR USERNSME>' |
# coding=utf-8 | |
from mapreduce import SimpleMapReduce | |
from simple import FILES, file_parser | |
def count_err_log(item): | |
word, occurances = item | |
return (word, sum(occurances)) | |
import threading | |
count = 0 | |
def incre(): | |
global count | |
count += 1 | |
#/usr/bin/env python | |
# coding=utf-8 | |
import random | |
import re | |
def color(messages): | |
color = '\x1B[%d;%dm' % (1,random.randint(30,37)) | |
return '%s %s\x1B[0m' % (color,messages) |