Skip to content

Instantly share code, notes, and snippets.

@lookis
lookis / pypy3-fix
Last active Mar 1, 2020
fix tk 8.6 in pypy3
View pypy3-fix
/usr/local/Cellar/pypy3/7.3.0/libexec/lib_pypy/_tkinter
mv tklib_cffi.pypy36-pp73-darwin.so tklib_cffi.pypy36-pp73-darwin.so.bak
cp ~/Downloads/pypy3.6-v7.3.0-osx64/lib_pypy/_tkinter/tklib_cffi.pypy36-pp73-darwin.so .
@lookis
lookis / setup.md
Created Jan 17, 2018 — forked from novemberborn/setup.md
OS X Redirect ports 80 and 443 to 8080 and 8443 respectively
View setup.md

Changes with .dev domains in mind.

Create /etc/pf.anchors/dev, containing:

rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443

@lookis
lookis / gist:c198ccde7b8741c19d3e4c749cc4bee0
Created Nov 29, 2017
Remo Omni Sync Server Directory
View gist:c198ccde7b8741c19d3e4c749cc4bee0
echo -n "To remove your OmniPresence data, please enter your Omni Sync Server account name: "; read OSSACCOUNT; curl -v --request DELETE --location-trusted --digest --user "$OSSACCOUNT" "https://sync.omnigroup.com/$OSSACCOUNT/usage"
View .bashrc
gotmp () {
cd `mktemp -d`
}
View 蛋卷八仙择时.py
import pandas as pd
import numpy as np
import talib
import tushare as ts
import datetime
def timing(df):
r = []
for index, row in df.iterrows():
if(index != len(df.index) - 1 and (row['low'] < df.iloc[[index + 1]]['low']).tolist()[0] and (row['high'] > df.iloc[[index + 1]]['high']).tolist()[0]):
@lookis
lookis / gist:77bf0ee3ba762b1bfbd4
Last active Nov 9, 2016
代码管理与规范
View gist:77bf0ee3ba762b1bfbd4

代码工作流程

1.先把要修改的工程fork到自己的github账号上.

2.在具体解决某个issue之前,先在自己的工程里创建一个分支,分支名字建议和issue的id相关以方便自己维护

3.在这个分支上具体解决该issue, 自己做好review之后提交一个pull-request

4.在pull-request被merge之前,如果需要解决一个新的issue,就再建立新的branch来工作,如果临时需要修改之前的那个提交,记得切换回刚才的branch

View gist:81136a37ba0c8bed37f5
CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'mypass';
GRANT ALL ON db1.* TO 'jeffrey'@'localhost';
flush privileges;
View keybase.md

Keybase proof

I hereby claim:

  • I am lookis on github.
  • I am lookis (https://keybase.io/lookis) on keybase.
  • I have a public key whose fingerprint is AAA0 29AF 6ACE 5604 8917 D0DA 6038 D951 DE43 0E91

To claim this, I am signing this object:

You can’t perform that action at this time.