This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Bucket | |
type = "2" | |
version = "2.0"> | |
<Breakpoints> | |
<!-- All Exceptions --> | |
<BreakpointProxy | |
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
<BreakpointContent |
This file contains 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 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 for Mac 配置文件 | |
# 显示 Finder 隐藏文件,将 .surge.conf 文件复制到 ~/ 也就是「个人」目录下。 | |
[General] | |
# warning, notify, info, verbose | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local | |
bypass-tun = 0.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
loglevel = notify | |
# 默认 IP 和端口,不修改的话系统网络 HTTP 和 HTTPS 代理设置中就是 127.0.0.1:6152 |
This file contains 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
1、 三角函数 | |
double sin (double);正弦 | |
double cos (double);余弦 | |
double tan (double);正切 | |
2 、反三角函数 | |
double asin (double); 结果介于[-PI/2, PI/2] | |
double acos (double); 结果介于[0, PI] | |
double atan (double); 反正切(主值), 结果介于[-PI/2, PI/2] | |
double atan2 (double, double); 反正切(整圆值), 结果介于[-PI, PI] | |
3 、双曲三角函数 |
This file contains 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
+ (AppDelegate *)sharedAppDelegate { | |
return (AppDelegate *)[[UIApplication sharedApplication] delegate]; | |
} |
This file contains 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
// Very slightly adapted from http://stackoverflow.com/a/30141700/106244 | |
// 99.99% Credit to Martin R! | |
// Mapping from XML/HTML character entity reference to character | |
// From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references | |
private let characterEntities : [String: Character] = [ | |
// XML predefined entities: | |
""" : "\"", | |
"&" : "&", |
This file contains 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
{ | |
Filter = { | |
Bundles = ( | |
"com.sina.weibo", | |
"com.tencent.xin", | |
"com.tencent.mqq", | |
"com.apple.AppStore", | |
); | |
}; | |
} |
This file contains 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
enum ColorDescriptor { | |
case PatternImage(imageName: String) | |
case RGB(r: Int, g: Int, b: Int, a: Int) | |
} | |
extension ColorDescriptor : StringLiteralConvertible, RawRepresentable, Equatable { | |
typealias RawValue = StringLiteralType | |
typealias ExtendedGraphemeClusterLiteralType = StringLiteralType | |
typealias UnicodeScalarLiteralType = StringLiteralType | |
This file contains 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
# Command lines tools | |
xcode-select --install | |
# Install dependencies | |
brew install wget autoconf openssl libjpeg libpng lzlib curl imap-uw readline postgresql libxml2 mcrypt gettext libxslt homebrew/dupes/libiconv icu4c expat bison webp freetype | |
# Dirs | |
mkdir -p /Applications/MAMP/bin/php/php7.1.1/include | |
cd /Applications/MAMP/bin/php/php7.1.1/include |
This file contains 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
#!/bin/sh | |
set -e | |
set -x | |
# This is an example script for updating Phabricator, similar to the one used to | |
# update <https://secure.phabricator.com/>. It might not work perfectly on your | |
# system, but hopefully it should be easy to adapt. This script is not intended | |
# to work without modifications. |
OlderNewer