Skip to content

Instantly share code, notes, and snippets.

Xiaoping Tang ergatea

  • Wuxi
Block or report user

Report or block ergatea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:341f58e6cd4a15818441c01a5bcc3582
study(title='[PW] PiggyWoo', shorttitle='PW', overlay=true)
//######################################################################
// EMA CANDLES
//######################################################################
// vars
emaPeriod = input(title="GRaB: EMA Period", type=integer, defval=34)
showWave = input(title="GRaB: Show Wave", type=bool, defval=false)
@ergatea
ergatea / git_toturial
Created Aug 16, 2016 — forked from guweigang/git_toturial
git命令大全
View git_toturial
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
View ip.py
#!/usr/bin/python
# Set up a new A record in Cloudflare, add the details of it along with your account details below
# Make sure this script runs on startup (or whenever you get a new IP...)
#
# @author Aaron Rice <aaron@duedil.com>
import urllib
import json
View cloudflare_dynamic_dns.py
#!/usr/bin/python
# Set up a new A record in Cloudflare, add the details of it along with your account details below
# Make sure this script runs on startup (or whenever you get a new IP...)
#
# @author Aaron Rice <aaron@duedil.com>
import urllib
import json
View ocf-cc.py
#!/usr/bin/env python
# Convert files in Open Container Format from Traditional Chinese
# to Simplified Chinese.
import sys, os, zipfile, re, codecs, subprocess
from xml.dom import minidom
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
debug = True
View zerowall.sh
#!/bin/bash
cat << EOF
/*
* Proxy Auto-Config file generated by autoproxy2pac
* Rule source: http://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt
* Last update: Sat, 16 Jun 2012 16:35:28 GMT
*/
@ergatea
ergatea / init.sh
Created Jan 19, 2013
Sublime Text SublimeCodeIntel plugin auto
View init.sh
#!/bin/bash
# This hook is run after a new virtualenv is activated.
# setup python interpretor and sitepackages
# for Sublime Text's SublimeCodeIntel plugin.
# codeintel looks in the root of any folder opened via `subl foldername`
# for project/.codeintel/config
# put the project directory
View supervisorctl.conf
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
@ergatea
ergatea / routes.py
Last active Dec 11, 2015
debian route 更新脚本
View routes.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import urllib
import math
import subprocess
def external_cmd(cmd):
@ergatea
ergatea / tunnel.sh
Last active Dec 11, 2015
tunnel for iptables,redsocks
View tunnel.sh
#!/bin/bash -x
if [ -z "$1" ]; then echo Argument needed. >&2; exit 1; fi
if [ -z "$(pidof redsocks)" ]; then echo Redsocks requied >&2; exit 2; fi
DEF_IF="$(/sbin/route -n |awk '/^0.0.0.0/{print $8}')"
if [ -z "$DEF_IF" ]; then echo Cannot get default interface >&2; exit 3; fi
echo "Starting tunnel to $1..."
You can’t perform that action at this time.