$ pip install click requests
$ python query_export.py --redash-url "https://app.redash.io/" --api-key ""
// | |
// UILabel+JumpingDots.swift | |
// JumpingDots | |
// | |
// Copyright (c) 2016 Arkadiusz Holko. All rights reserved. | |
// | |
import UIKit | |
import ObjectiveC |
// LEARNING CURRYING | |
struct structA { | |
let a:Int | |
let b:Int | |
init(a:Int, b:Int) { | |
self.a = a | |
self.b = b | |
} | |
} |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
// | |
// RACSignal+Extensions.swift | |
// ReactiveSwiftFlickrSearch | |
// | |
// Created by Colin Eberhardt on 15/07/2014. | |
// Copyright (c) 2014 Colin Eberhardt. All rights reserved. | |
// | |
import Foundation |
gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib |
@import WatchKit; | |
#import <ReactiveCocoa/ReactiveCocoa.h> | |
@interface WKInterfaceController (Reactive) | |
@property (nonatomic, readonly) RACSignal *activatedSignal; | |
@property (nonatomic, readonly) RACSignal *deactivatedSignal; | |
@property (nonatomic, readonly) RACSignal *didPresentControllerSignal; | |
@property (nonatomic, readonly) RACSignal *didPushControllerSignal; |
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = 'https://hooks.slack.com/services/...'; | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; |
func checkShouldDownloadFileAtLocation(urlString:String, completion:((shouldDownload:Bool) -> ())?) { | |
var request = NSMutableURLRequest(URL: NSURL(string: urlString)!) | |
request.HTTPMethod = "HEAD" | |
var session = NSURLSession.sharedSession() | |
var err: NSError? | |
var task = session.dataTaskWithRequest(request, completionHandler: { [weak self] data, response, error -> Void in | |
if let strongSelf = self { | |
var isModified = false |