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/local/bin/python | |
| SMTPserver = 'smtp.sina.com' | |
| sender = '<[email protected]>' | |
| destination = ['[email protected]'] | |
| USERNAME = "[email protected]" | |
| PASSWORD = "*******" | |
| # typical values for text_subtype are plain, html, xml |
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 allLinks = $('.p-thumb a').map(function(i,el) { return "http:"+$(el).attr('href'); }); | |
| $.each(allLinks, function(index, val) { | |
| console.log(val); | |
| }); |
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
| [user] | |
| name = xuelangZF | |
| email = [email protected] | |
| [core] | |
| excludesfile = /Users/feizhao/.gitignore_global | |
| editor = vim | |
| quotepath = false | |
| [difftool "sourcetree"] | |
| cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
| path = |
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
| $(".album_soundlist ul li").each(function(i){ | |
| var sound_id = $(this).attr("sound_id"); | |
| var json_url = "http://www.ximalaya.com/tracks/" + sound_id + ".json"; | |
| $.get(json_url,function(json){ | |
| var save_name = json.nickname + "-" + json.title + ".m4a"; | |
| var down_cmd = "wget " + json.play_path_64 + " -O " + save_name | |
| console.log(down_cmd); | |
| }) | |
| }) |
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 sh | |
| # Find all the src file in your project | |
| py_files=`find . -name '*.py'` | |
| html_files=`find . -name '*.html'` | |
| css_files=`find . -name '*.css'` | |
| for i in $py_files | |
| do | |
| filename=$(basename "$i") |
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
| # 规则配置仅供参考,适用于 Surge iOS & Mac; | |
| # 包含 Reject 规则,用于拦截广告、行为分析、数据统计 | |
| # 屏蔽部分运营商劫持网页弹出流量统计 | |
| # 部分特性可能仅适用于最新的 TestFlight 版本 | |
| # 参数说明 zhHans.conf.ini http://bit.ly/29kwXlZ | |
| # https://gist.githubusercontent.com/scomper/915b04a974f9e11952babfd0bbb241a8/raw/surge.conf | |
| [General] | |
| # warning, notify, info, verbose | |
| loglevel = notify |
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
| # 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf | |
| # 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备 | |
| # Version 2.0 | |
| [General] | |
| # 日志等级: warning, notify, info, verbose (默认值: notify) | |
| loglevel = notify | |
| # 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS | |
| # 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理 | |
| # 设置中.) |
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
| $(function() { | |
| var fix = $('#toc'); //滚动悬浮块 | |
| var fixTop = fix.offset().top, //滚动悬浮块与顶部的距离 | |
| fixHeight = fix.height(); //滚动悬浮块高度 | |
| $(window).scroll(function() { | |
| $(":header").each(function() { | |
| var id = $(this).attr('id'); | |
| // 跳过标题 | |
| if (typeof id != 'undefined'){ |
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
| #include <iostream> | |
| #include <fstream> | |
| #include <cmath> | |
| #include <vector> | |
| #include <algorithm> | |
| using namespace std; | |
| //ifstream in_file("/Users/feizhao/Desktop/A-small-practice.in"); | |
| ifstream in_file("/Users/feizhao/Desktop/A-large-practice.in"); | |
| //ifstream in_file("/Users/feizhao/Desktop/demo.in"); |
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
| # Tested with Python 2.7.9, Linux & Mac OS X | |
| import socket | |
| import StringIO | |
| import sys | |
| class WSGIServer(object): | |
| address_family = socket.AF_INET | |
| socket_type = socket.SOCK_STREAM |