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
| lzz@ubuntu:~/gitTest$ git config --global user.name 'orangle' | |
| lzz@ubuntu:~/gitTest$ git config --global user.email '[email protected]' | |
| lzz@ubuntu:~/gitTest$ get init | |
| lzz@ubuntu:~/gitTest$ git add . | |
| lzz@ubuntu:~/gitTest$ git commit | |
| lzz@ubuntu:~/gitTest$ git diff | |
| lzz@ubuntu:~/gitTest$ git status | |
| lzz@ubuntu:~/gitTest$ git add first.txt | |
| lzz@ubuntu:~/gitTest$ git commit | |
| lzz@ubuntu:~/gitTest$ git log |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| #python2.7x | |
| #random_weight.py | |
| #author: [email protected] 2014-10-11 | |
| ''' | |
| 每个元素都有权重,然后根据权重随机取值 | |
| 输入 {"A":2, "B":2, "C":4, "D":10, "E": 20} |
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
| @echo on | |
| color 2f | |
| mode con: cols=80 lines=25 | |
| @REM | |
| @echo start to clean all .py files in current directory and children directories | |
| @rem for /r . %%a in (.) do @if exist "%%a\*.py" @echo "%%a\*.py" | |
| @for /r . %%a in (.) do @if exist "%%a\*.py" del /a /f /s "%%a\*.py" | |
| @echo 清理完毕! | |
| @pause |
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
| #-*- coding: utf-8 -*- | |
| #python2.7x | |
| #author: [email protected] 2014-12-12 | |
| #psutiltest.py | |
| ''' | |
| 照着教程简单学习下psutil的使用,windows下试试 | |
| ''' | |
| import psutil | |
| import datetime |
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
| #-*- coding: utf-8 -*- | |
| #python2.7x | |
| #author: [email protected] 2014-12-16 | |
| #alipayServer | |
| ''' | |
| 模拟接收支付宝充值请求和返回交易信息处理 | |
| ''' | |
| import hashlib | |
| import threading | |
| import urllib, urllib2 |
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
| # -*- encoding=utf-8 -*- | |
| import os | |
| from time import time | |
| from tempfile import NamedTemporaryFile | |
| try: | |
| from PIL import Image | |
| except ImportError: | |
| import Image | |
| from settings import MEDIA_ROOT |
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
| #!/usr/bin/python | |
| #-*- coding:utf-8 -*- | |
| ############################ | |
| #File Name: counting_file.py | |
| #Author: orangleliu | |
| #Mail: [email protected] | |
| #Created Time: 2015-03-11 16:41:05 | |
| #License: MIT | |
| ############################ | |
| ''' |
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 | |
| PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin | |
| CONFIGURE=uwsgi.ini | |
| PID_FILE=/var/portal/uwsgi.pid | |
| case "$@" in | |
| start) | |
| uwsgi --ini $CONFIGURE | |
| echo "start uwsgi ok.." |
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 | |
| VENV=$1 | |
| if [ -z $VENV ]; then | |
| echo "usage: runinenv [virtualenv_path] CMDS" | |
| exit 1 | |
| fi | |
| . ${VENV}/bin/activate | |
| shift 1 | |
| echo "Executing $@ in ${VENV}" | |
| exec "$@" |
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 | |
| #author: [email protected] | |
| #use this shell script with cron | |
| file=/home/ftp/rulebase/rules.list | |
| md5checkfile=/tmp/rulebase.md5 | |
| if [ ! -f $file ] | |
| then | |
| echo "$file not exist .." | |
| exit 1 |
OlderNewer