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
import bpy | |
# Mark all scene devices as GPU for cycles | |
bpy.context.scene.cycles.device = 'GPU' | |
print("--------------- SCENE LIST ---------------") | |
for scene in bpy.data.scenes: | |
print(scene.name) | |
scene.cycles.device = 'GPU' | |
scene.render.resolution_percentage = 200 |
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://stackoverflow.com/questions/24755558/measure-elapsed-time-in-swift | |
let begin = NSDate() | |
print(begin) | |
let elapsedTime = timeIntervalSinceDate(begin) | |
let elapsedTime2 = begin.timeIntervalSinceNow |
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
// Inspired from | |
// http://stackoverflow.com/a/26221732/2438676 | |
// http://derekneely.com/tag/resize-text/ | |
// http://stackoverflow.com/a/27115350/2438676 | |
import UIKit | |
extension UIFont { | |
class func adaptiveFontWithName(fontName: String, label: UILabel, minSize: CGFloat = 9, maxSize: CGFloat = 999) -> UIFont! { |
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
#/etc/sysctl.conf | |
# max open files | |
fs.file-max = 51200 | |
# max read buffer | |
net.core.rmem_max = 67108864 | |
# max write buffer | |
net.core.wmem_max = 67108864 | |
# default read buffer | |
net.core.rmem_default = 65536 | |
# default write buffer |
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
#/etc/security/limits.conf | |
* soft nofile 51200 | |
* hard nofile 51200 |
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
[General] | |
loglevel = notify | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
[Proxy] | |
Proxy = custom, 1.2.3.4, 443, rc4-md5, password, http://surge.run/SSEncrypt.module | |
[Rule] | |
DOMAIN-KEYWORD,google,Proxy,force-remote-dns |
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
[General] | |
# warning, notify, info, verbose | |
loglevel = notify | |
bypass-system = true | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
dns-server = 114.114.114.114,119.29.29.29,8.8.8.8 | |
[Proxy] | |
# http, https, socks5 |
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
#Xcode 自动版本号 | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion `git rev-list HEAD | wc -l | awk '{print $1}'`" "$INFOPLIST_FILE" |
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
#import <UIKit/UIKit.h> | |
@interface SecondViewController : UIViewController | |
@end |