This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
import UIKit | |
import SnapKit | |
class ViewController: UIViewController { | |
var scrollView: UIScrollView! | |
var stackView: UIStackView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
var fs = require('fs'); | |
var crypto = require('crypto'); | |
fs.readFile('file.pdf', function(err, data) { | |
var checksum = generateChecksum(data); | |
console.log(checksum); | |
}); | |
function generateChecksum(str, algorithm, encoding) { | |
return crypto |
import UIKit | |
open class LayerView<Layer: CALayer>: UIView { | |
public final override class var layerClass: Swift.AnyClass { | |
return Layer.self | |
} | |
public final var concreteLayer: Layer { | |
return layer as! Layer | |
} |
location = /apple-app-site-association { | |
proxy_pass http://static.example.com/apple-app-site-association; | |
proxy_hide_header Content-Type; | |
add_header Content-Type "application/json"; | |
} | |
or | |
location = apple-app-site-association { | |
default_type application/json; |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
import Foundation | |
import UIKit | |
enum DeviceMaxWidth: Float { | |
case iPhone4 = 480.0 | |
case iPhone5 = 568.0 | |
case iPhone6 = 667.0 | |
case iPhone6Plus = 736.0 | |
case iPad = 1024.0 | |
case iPadPro = 1366.0 |
#!/bin/bash | |
limit="${1-10000000}"; | |
echo "Keeping SourceKitService below $limit KiB of virtual memory." | |
echo "Hit ^C to quit." | |
while true; do | |
sleep 1; | |
p=`pgrep ^SourceKitService$` | |
if [ -n "$p" ]; then | |
vsz=`ps -o vsz -p "$p" | tail -1` |
function FindProxyForURL(url, host) { | |
var useSocks = ["imgur.com"]; | |
for (var i= 0; i < useSocks.length; i++) { | |
if (shExpMatch(host, useSocks[i])) { | |
return "SOCKS localhost:9999"; | |
} | |
} | |
return "DIRECT"; |
{ | |
"countries":[ | |
{ | |
"name":"Afghanistan", | |
"phoneCode":"93", | |
"iso":"AF" | |
}, | |
{ | |
"name":"Albania", | |
"phoneCode":"355", |