Skip to content

Instantly share code, notes, and snippets.

View Latias94's full-sized avatar
😎
Studying

Latias94 Latias94

😎
Studying
View GitHub Profile
@Latias94
Latias94 / proxyfile
Created December 7, 2016 04:10
shadowsock 配置
# 这是本地监听的HTTP代理的端口地址。
# SpechtLite还会自动启用一个位于port+1的SOCKS5代理服务器。
# 选择大于1024的未被占用的端口即可。
port: 9090
# 下面定义adapter,即远程代理服务器的信息。每个adapter代表一个远程代理服务器。
adapter:
# 在定义规则的时候,我们使用id来引用当前定义的adapter。
# 程序自动定义了一个id为direct的adapter,使用这个adapter将会不走代理直接连接目标服务器。因此自定义id不能为direct。
# - id: adapter1
# # 类型为HTTP代理服务器.
{% aplayer title author url [picture_url, narrow, autoplay, width:xxx, lrc:xxx] %}
@Latias94
Latias94 / music example
Created November 24, 2016 06:08
使用内置标签
{% aplayer "童话镇" "陈一发儿" "http://xxxx/music.mp3" "http://xxxx/picture.jpg" "lrc:http://xxxx/lrc.txt" %}
@Latias94
Latias94 / binarySearch.swift
Created October 14, 2016 02:08
Swift 二分查找带print
func countOccurrencesOfKey(_ key: Int, inArray a: [Int]) -> Int {
func leftBoundary() -> Int {
print("---------------")
var low = 0
var high = a.count
var index = 0
while low < high {
index += 1
print("左边界第\(index)次查找")
let midIndex = low + (high - low)/2