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
| ### Keybase proof | |
| I hereby claim: | |
| * I am sonsongithub on github. | |
| * I am sonson (https://keybase.io/sonson) on keybase. | |
| * I have a public key whose fingerprint is E21F A289 4EA6 4A20 6BCA F297 E32E E7C2 5FFC 53CA | |
| To claim this, I am signing this object: |
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
| require 'nokogiri' | |
| require 'net/http' | |
| require 'json' | |
| def getHTML(url) | |
| begin | |
| uri = URI.parse(url) | |
| response = Net::HTTP.start(uri.host, uri.port) do |http| | |
| http.open_timeout = 15 | |
| http.read_timeout = 15 |
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 | |
| import PlaygroundSupport | |
| import AVFoundation | |
| import AVKit | |
| import QuartzCore | |
| private class CameraViewController: UIViewController, PlaygroundLiveViewMessageHandler, AVCaptureVideoDataOutputSampleBufferDelegate { | |
| var input:AVCaptureDeviceInput! |
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
| ./scripts/download_model_binary.py models/bvlc_reference_caffenet | |
| ./scripts/download_model_binary.py models/bvlc_alexnet | |
| ./scripts/download_model_binary.py models/bvlc_reference_rcnn_ilsvrc13 | |
| ./scripts/download_model_binary.py models/bvlc_googlenet |
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
| @IBAction func push(sender: AnyObject) { | |
| print("push") | |
| let s1 = 100 | |
| let ptr1 = UnsafeMutablePointer<UInt8>(allocatingCapacity: s1) | |
| for i in 0 ..< s1 { | |
| (ptr1 + i).pointee = UInt8(10) | |
| } | |
| (ptr1 + 200).pointee = UInt8(10) | |
| ptr1.deallocateCapacity(0) | |
| } |
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
| require 'json' | |
| require 'date' | |
| r = [] | |
| hosts = [] | |
| hosts.each{|host| | |
| if`sudo openssl x509 -in /etc/letsencrypt/live/#{host}/fullchain.pem -noout -dates` =~ /notAfter=(.+?)$/ | |
| entry = {} |
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
| NSString *clientID = @"your client ID"; | |
| NSString *XMashapeKey = @"your key"; | |
| NSMutableCharacterSet *allowedCharacterSet = [NSMutableCharacterSet alphanumericCharacterSet]; | |
| [allowedCharacterSet addCharactersInString:@"-._~"]; | |
| NSString *base64 = [imageBinaryData base64EncodedStringWithOptions:0]; | |
| NSString *escapedBase64 = [base64 stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; | |
| NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://imgur-apiv3.p.mashape.com/3/image"]]; |
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
| require 'net/http' | |
| require 'uri' | |
| require 'json' | |
| uri = URI.parse('https://fcm.googleapis.com/fcm/send') | |
| http_proxy = ENV['HTTP_PROXY'] | |
| https_proxy = ENV['HTTPS_PROXY'] | |
| proxy_host = nil |
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
| protocol Photo { | |
| func getName() -> String | |
| } | |
| struct Facebook: Photo { | |
| func getName() -> String { | |
| return "facebook" | |
| } | |
| } |
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 cell = tableView.dequeueReusableCellWithIdentifier(contents.cellIdentifier) |