Skip to content

Instantly share code, notes, and snippets.

View adamkaplan's full-sized avatar

Adam adamkaplan

View GitHub Profile
@adamkaplan
adamkaplan / PolicePrecincts.geojson
Created December 9, 2017 20:36
NYPD Precincts 12-2017
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?
if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
define('RANDOM_COMPAT_READ_BUFFER', 8);
}
function random_bytes($bytes)
{
static $fp = null;
/**
#include <mach/mach_time.h>
NSURLSessionDataTask *task;
void(^doFetch)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error);
NSArray *smallImages = @[@"https://s.yimg.com/av/curveball/ads/pr/RESIZE/82x82/1342c899c7055c754f17a7e2d948330a.jpeg",
@"https://s.yimg.com/av/curveball/ads/pr/RESIZE/82x82/3c549674c2851a410348412ea45c2eab.jpeg",
@"https://s.yimg.com/av/curveball/ads/pr/RESIZE/82x82/85f1c40fe33d2234ec7d5c8bf01e3a25.jpeg",
@"https://s.yimg.com/av/curveball/ads/pr/RESIZE/82x82/eaa3b450578344d79f1a5ebec9dfdb70.jpeg",
@adamkaplan
adamkaplan / assetlinks.json
Last active March 8, 2019 02:09
Finance Android App Links File
@adamkaplan
adamkaplan / UserAgent.swift
Created April 30, 2019 17:58
User Agent Strings in Swift
public class UserAgent {
public static let userAgent: String? = {
guard let info = Bundle.main.infoDictionary,
let appNameRaw = info["CFBundleDisplayName"] ?? info[kCFBundleIdentifierKey as String],
let appVersionRaw = info[kCFBundleVersionKey as String],
let appName = appNameRaw as? String,
let appVersion = appVersionRaw as? String
else { return nil }
#if canImport(UIKit)