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
package models | |
import "github.com/albrow/zoom" | |
func Init() { | |
if err := zoom.Register(&User{}); err != nil { | |
panic(err) | |
} | |
} |
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
1411704160.299 4877 172.17.8.103 TCP_MISS/200 5736 CONNECT registry-1.docker.io:443 - HIER_DIRECT/162.242.195.84 - | |
1411704161.724 1423 172.17.8.103 TCP_MISS/200 5260 CONNECT registry-1.docker.io:443 - HIER_DIRECT/162.242.195.84 - | |
1411704166.163 4439 172.17.8.103 TCP_MISS/200 19599 CONNECT dseasb33srnrn.cloudfront.net:443 - HIER_DIRECT/54.230.174.166 - | |
1411704171.349 5158 172.17.8.103 TCP_MISS/200 5738 CONNECT registry-1.docker.io:443 - HIER_DIRECT/162.242.195.84 - | |
1411704172.908 1557 172.17.8.103 TCP_MISS/200 5260 CONNECT registry-1.docker.io:443 - HIER_DIRECT/162.242.195.84 - | |
1411704173.258 348 172.17.8.103 TCP_MISS/200 9858 CONNECT dseasb33srnrn.cloudfront.net:443 - HIER_DIRECT/54.230.174.166 - | |
1411704174.858 1570 172.17.8.103 TCP_MISS/200 5743 CONNECT registry-1.docker.io:443 - HIER_DIRECT/162.242.195.84 - | |
1411704176.468 1607 172.17.8.103 TCP_MISS/200 5260 CONNECT registry-1.docker.io:443 - HIER_DIRECT/162.242.195.84 - | |
1411704180.668 4198 172.17.8.103 TCP_MISS/200 728223 CONNECT dseasb33 |
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
Gurpartap@Gurpartaps-iMac ~> powerline-setup | |
Traceback (most recent call last): | |
File "/Users/Gurpartap/Library/Python/2.7/bin/powerline-config", line 64, in <module> | |
pl = config.create_powerline_logger(args) | |
File "/Users/Gurpartap/Library/Python/2.7/lib/python/site-packages/powerline/bindings/config.py", line 86, in create_powerline_logger | |
common_config = finish_common_config(get_preferred_output_encoding(), config['common']) | |
File "/Users/Gurpartap/Library/Python/2.7/lib/python/site-packages/powerline/lib/encoding.py", line 48, in get_preferred_output_encoding | |
or locale.getdefaultlocale()[1] | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 511, in getdefaultlocale | |
return _parse_localename(localename) |
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
macappstores://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/redeemLandingPage?code=CODE_GOES_HERE |
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
core@master ~ $ journalctl -f -e | |
-- Logs begin at Sat 2014-11-01 12:02:16 UTC. -- | |
Nov 01 12:02:16 localhost kernel: ftrace: allocating 19291 entries in 76 pages | |
Nov 01 12:02:16 localhost kernel: ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 | |
Nov 01 12:02:16 localhost kernel: smpboot: CPU0: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz (fam: 06, model: 2a, stepping: 07) | |
Nov 01 12:02:16 localhost kernel: APIC calibration not consistent with PM-Timer: 110ms instead of 100ms | |
Nov 01 12:02:16 localhost kernel: APIC delta adjusted to PM-Timer: 6249985 (6936088) | |
Nov 01 12:02:16 localhost kernel: Performance Events: unsupported p6 CPU model 42 no PMU driver, software events only. | |
Nov 01 12:02:16 localhost kernel: x86: Booted up 1 node, 1 CPUs | |
Nov 01 12:02:16 localhost kernel: smpboot: Total of 1 processors activated (6182.60 BogoMIPS) |
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
public func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, willCacheResponse proposedResponse: NSCachedURLResponse, completionHandler: (NSCachedURLResponse!) -> Void) { | |
let response = proposedResponse.response | |
let httpResponse = response as NSHTTPURLResponse | |
let headers: [NSObject: AnyObject] = httpResponse.allHeaderFields | |
var cachedResponse: NSCachedURLResponse! | |
if !contains(headers.keys, "Cache-Control") { | |
var modifiedHeaders: [NSObject: AnyObject] = headers | |
modifiedHeaders["Cache-Control"] = "max-age=60" | |
let modifiedResponse = NSHTTPURLResponse(URL: httpResponse.URL!, statusCode: httpResponse.statusCode, HTTPVersion: "HTTP/1.1", headerFields: modifiedHeaders) |
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
a) Show every 14 days: | |
{ | |
"popup_mode": "auto", | |
"auto_interval": "14", | |
"popup_id": "does_not_matter", | |
"url": "http://..." | |
} | |
b) Show once: |
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 Foundation | |
import AVFoundation | |
// My app doesn't use meta data, so you're on your own with the following code. | |
public class PlayerViewController: UIViewController, FSPCMAudioStreamDelegate { | |
private var _cachedAudioController: FSAudioController? | |
private var _audioController: FSAudioController! { | |
get { |
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 Quick | |
import Nimble | |
class LibrarySpec: QuickSpec { | |
override func spec() { | |
describe("library") { | |
var library: Library! | |
beforeEach { | |
library = Library() |
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
let TWITTER_CONSUMER_KEY = "" | |
let TWITTER_CONSUMER_SECRET_KEY = "" | |
let twitter = STTwitterAPI(OAuthConsumerKey: TWITTER_CONSUMER_KEY, consumerSecret: TWITTER_CONSUMER_SECRET_KEY) | |
// Step 1 | |
twitter.postReverseOAuthTokenRequest({ (authenticationHeader) -> Void in | |
println("authenticationHeader: \(authenticationHeader)") | |
let twitterAPIOS = STTwitterAPI.twitterAPIOSWithFirstAccount() // Set your ACAccount instance here. | |