Skip to content

Instantly share code, notes, and snippets.

View 7kfpun's full-sized avatar
🦊

kf 7kfpun

🦊
View GitHub Profile
@7kfpun
7kfpun / gist:329a2b0d6ee1d9e62797
Created October 29, 2015 07:14
Homescreen icon (Android, iOS, Win8)
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="images/android-desktop.png">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Material Design Lite">
<link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">
China stock api
1.163_API(0-sh,1-sz):http://api.money.126.net/data/feed/1002151,0600036,hkHSI,hkHSCEI,hk00005
2.QQ_API(sh,sz,s_simple data):http://qt.gtimg.cn/r=0.8409869808238q=s_sz000559,s_sz002434,s_sz002472,s_sz002488,hk00700
3.sina_API(sh,sz,s_simple data):http://hq.sinajs.cn/list=sh600000,sh600004,hk00700,sz002594
# 4.xueqiu_API:http://xueqiu.com/v4/stock/quote.json?code=02318,01211,SH000001,DJI30,HKHSI
163
日内实时盘口(JSON):
http://api.money.126.net/data/feed/1000002,1000001,1000881,0601398,money.api
@7kfpun
7kfpun / gist:a8d1326db44aa7857660
Created June 25, 2015 10:09
Remove the X-Requested-With header from ajax requests
http://stackoverflow.com/questions/3372962/can-i-remove-the-x-requested-with-header-from-ajax-requests
jQuery.ajax({
url: yourAjaxUrl,
// 'xhr' option overrides jQuery's default
// factory for the XMLHttpRequest object.
// Use either in global settings or individual call as shown here.
xhr: function() {
Installation
------------
# sudo apt-get install ntp
Configuration
-------------
Edit /etc/ntp.conf and reload by `sudo service ntp reload`
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
while true;do clear;date;sleep 1;done
# OR #
while true;do clear;date +"%r";sleep 1;done
BeautifulSoup
Celery
Django
Jinja2
Pil
Pillow
PyJWT
PyYAML
Pygments
Sharpy
@7kfpun
7kfpun / gist:008f35a59cd28fbd172f
Created March 12, 2015 06:25
How to Shrink a Git Repository
http://stevelorek.com/how-to-shrink-a-git-repository.html
http://askubuntu.com/questions/519696/twofinger-scroll-on-lenovo-g50
curl -L https://npmjs.com/install.sh | sh
@7kfpun
7kfpun / gist:6d588acef363749daefa
Last active August 29, 2015 14:16
install nodejs
wget http://nodejs.org/dist/v0.12.0/node-v0.12.0.tar.gz
tar -zxf node-v0.12.0.tar.gz
cd node-v0.12.0
./configure && make && sudo make install