Skip to content

Instantly share code, notes, and snippets.

@ChandleWEi
ChandleWEi / gist:11389306
Created April 29, 2014 02:21
Kaleidodcope "xcrun: error: cannot be used within an App Sandbox..."
cd /Applications/Kaleidoscope.app/Contents/Resources/Integration/scripts
./install_git-default
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/306xxjtg7uz13v0/306/306_hd_javascript_for_automation.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/404xxdxsstkaqjb/404/404_hd_advanced_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/701xx8n8ca3aq4j/701/701_hd_designing_accessories_for_ios_and_os_x.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/224xxxlsvigdoc0/224/224_hd_core_os_ios_application_architectural_patterns.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/717xxux5eg6f9v4/717/717_hd_kids_and_apps.mov?dl=1
http://devstreaming.ap
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_sd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_sd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_sd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_sd_building_interruptible_and_responsive_interactions.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/306xxjtg7uz13v0/306/306_sd_javascript_for_automation.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/404xxdxsstkaqjb/404/404_sd_advanced_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/701xx8n8ca3aq4j/701/701_sd_designing_accessories_for_ios_and_os_x.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/224xxxlsvigdoc0/224/224_sd_core_os_ios_application_architectural_patterns.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/717xxux5eg6f9v4/717/717_sd_kids_and_apps.mov?dl=1
http://devstreaming.ap
@ChandleWEi
ChandleWEi / gist:70c7c2eeac4e9a73fc0c
Created October 20, 2014 08:42
fixed Kaleidoscope plugin for Yosemite 10.10 git
1.sudo vi /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-difftool--helper
2.change Line 9 ". git-mergetool--lib" => ". /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-mergetool--lib"
3.change ~/.gitconfig file repace ksdiff path to system absolute path
[difftool "Kaleidoscope"]
cmd = /usr/local/bin/ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
require 'rqrcode_png'
str = "中文数字12312312"
str = str.force_encoding("CP852")
qr = RQRCode::QRCode.new(str)
png = qr.to_img
png.resize(90,90).save("Downloads/qrtest/cyzz.png")
@ChandleWEi
ChandleWEi / gist:8f8701d46610f30bf595de5ad1fd17fb
Created December 12, 2016 09:05 — forked from edwardmp/gist:df8517aa9f1752e73353
Using NSURLSession with SSL public key pinning
/*
1. Adhere to the NSURLSessionDelegate delegate
2. Initialize NSURLSession and specify self as delegate (e.g. [NSURLSession sessionWithConfiguration:defaultConfigObject delegate:self delegateQueue: [NSOperationQueue mainQueue]];)
3. Add the method below to your class
4. Change the certificate resource name
*/
- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler
{
SecTrustRef serverTrust = challenge.protectionSpace.serverTrust;
@ChandleWEi
ChandleWEi / deploy.rb
Created September 30, 2017 02:51 — forked from jbonney/deploy.rb
Mina deployment file to setup new host for Rails applications. Creates the folder structure, fill up the database.yml file, create the associated DB and user and set up new Apache virtual host file.
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm'
# Usually mina focuses on deploying to one host and the deploy options are therefore simple.
# In our case, there is a number of possible servers to deploy to, it is therefore necessary to
# specify the host that we are targeting.
server = ENV['server']
# Since the same host can have multiple applications running in parallel, it is necessary to
@ChandleWEi
ChandleWEi / History|-35d7f7ec|entries.json
Last active March 7, 2023 03:24
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/chandle/Documents/AIA/GitLab/robinhood/sts/Cargo.toml","entries":[{"id":"u62B.toml","timestamp":1661152919575},{"id":"q92u.toml","timestamp":1661153167798},{"id":"mNTs.toml","timestamp":1661153413963},{"id":"WuG6.toml","source":"undoRedo.source","timestamp":1661153501938}]}
@ChandleWEi
ChandleWEi / Apple_mobile_device_types.txt
Created September 29, 2021 02:39 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S