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
// ==UserScript== | |
// @name WZD | |
// @namespace http://myth.ren | |
// @version 0.0.1 | |
// @description just for learning | |
// @author Myth | |
// @match http://invest.wzdai.com/pagers/invest/detail_*.html | |
// @grant none | |
// @require http://code.jquery.com/jquery-latest.js | |
// @require http://w.myth.ren/amcharts.js |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
var d = new Date(); | |
d = new Date(d.getTime() - 3000000); | |
var date_format_str = d.getFullYear().toString()+"-"+((d.getMonth()+1).toString().length==2?(d.getMonth()+1).toString():"0"+(d.getMonth()+1).toString())+"-"+(d.getDate().toString().length==2?d.getDate().toString():"0"+d.getDate().toString())+" "+(d.getHours().toString().length==2?d.getHours().toString():"0"+d.getHours().toString())+":"+((parseInt(d.getMinutes()/5)*5).toString().length==2?(parseInt(d.getMinutes()/5)*5).toString():"0"+(parseInt(d.getMinutes()/5)*5).toString())+":00"; | |
console.log(date_format_str); | |
//2015-03-31 13:35:00 |
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
# InstallingCompilers see https://help.ubuntu.com/community/InstallingCompilers | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install build-essential | |
gcc -v | |
make -v | |
# git | |
sudo apt-get install git |
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
# download qt | |
# more versions see : http://download.qt.io/archive/qt/ | |
wget http://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz | |
# install qt | |
# see http://doc.qt.io/qt-4.8/install-x11.html | |
gunzip qt-everywhere-opensource-src-4.8.6.tar.gz | |
tar -xvf qt-everywhere-opensource-src-4.8.6.tar.gz | |
cd qt-everywhere-opensource-src-4.8.6 | |
# type `o` for open source use, type `yes` to accept the license | |
make |
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
myth@myth:~$ dig w.myth.ren | |
; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> w.myth.ren | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42119 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 | |
;; OPT PSEUDOSECTION: | |
; EDNS: version: 0, flags:; udp: 4096 |
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
https://freenode.net/faq.shtml#plusr | |
https://freenode.net/faq.shtml#nicksetup | |
https://freenode.net/faq.shtml#identify |
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 -*- | |
''' | |
Author : myth | |
Date : 15-5-14 | |
Email : belongmyth at 163.com | |
''' | |
Styles = dict( | |
list(zip(list(range(1, 9)),[ |
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
下载 svn | |
wget http://ftp.tsukuba.wide.ad.jp/software/apache/subversion/subversion-1.8.13.tar.gz | |
查看根目录下的 INSTALL 文件 | |
执行 ./autogen.sh | |
根据提示,下载 autoconf, libtool |
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
脚本 http://w.myth.ren/rsync_mgr.py | |
rsync.conf | |
########## Global Config ########## | |
pid file = /home/myth/tmp/rsync/rsyncd.pid | |
lock file = /home/myth/tmp/rsync/rsync.lock | |
log file = /home/myth/tmp/rsync/rsync.log |