Skip to content

Instantly share code, notes, and snippets.

View johndpope-karhoo's full-sized avatar

johndpope-karhoo

  • Karhoo
  • New York
View GitHub Profile
@johndpope-karhoo
johndpope-karhoo / simulator_populator
Last active September 13, 2016 01:53 — forked from cabeca/simulator_populator
This script removes and recreates all simulators in Xcode 6.
gem install snapshot; snapshot reset_simulators
killall Xcode
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
rm -rf ~/Library/Developer/CoreSimulator/Devices
open /Applications/Xcode.app
@johndpope-karhoo
johndpope-karhoo / Fastfile
Created September 23, 2016 16:21 — forked from dalu93/Fastfile
Fastfile example
fastlane_version "1.49.0"
default_platform :ios
######################
slack_webhook = 'https://...' #See Slack Incoming Webhook
slack_default_channel = '#channel'
default_production_scheme = 'YOUR-PRODUCTION-SCHEME'
certificates_output_path = './certificates'
profiles_output_path = './profiles'
@johndpope-karhoo
johndpope-karhoo / XCTestCase+Expectation.swift
Created October 5, 2016 20:29 — forked from cgoldsby/XCTestCase+Expectation.swift
XCTestCase extension with boilerplate code for unit testing async functions (waiting for expectations)
//
// AsyncTests.swift
//
import XCTest
// MARK: Async Helper Extension
extension XCTestCase {
@johndpope-karhoo
johndpope-karhoo / global_variable_demo.swift
Created October 5, 2016 20:48 — forked from huguesbr/global_variable_demo.swift
Simple global demo of global variable features (computed, willSet, didSet)
import XCTest
import Foundation
var testCases: [AnyClass] = []
class computedTests: XCTestCase {
let formula = 2 * M_PI
func testComputedGet() {
var radius: Double = 1
@johndpope-karhoo
johndpope-karhoo / inspect.py
Created October 18, 2016 14:17 — forked from hayd/inspect.py
inspect.py
"""Get useful information from live Python objects.
This module encapsulates the interface provided by the internal special
attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion.
It also provides some help for examining source code and class layout.
Here are some of the useful functions provided by this module:
ismodule(), isclass(), ismethod(), isfunction(), isgeneratorfunction(),
isgenerator(), istraceback(), isframe(), iscode(), isbuiltin(),
@johndpope-karhoo
johndpope-karhoo / mongo-notes.js
Created October 26, 2016 17:31 — forked from thoragio/mongo-notes.js
Mongo Notes
// MONGO COMMAND LINE
// start mongod
ulimit -n 2048 && mongod
// ctrl-c ends in same window, but can also use
killall mongod
// start mongod with data directory in another location
mongod -dbpath /path/to/data/dir
// open command line interface (mongo shell)
mongo
// restore a DB dump from a binary (BSON) dump file