Skip to content

Instantly share code, notes, and snippets.

Avatar

johndpope-karhoo

  • Karhoo
  • New York
View GitHub Profile
View mongo-notes.js
// 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
View 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 / global_variable_demo.swift
Created Oct 5, 2016 — forked from huguesbr/global_variable_demo.swift
Simple global demo of global variable features (computed, willSet, didSet)
View global_variable_demo.swift
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 / XCTestCase+Expectation.swift
Created Oct 5, 2016 — forked from cgoldsby/XCTestCase+Expectation.swift
XCTestCase extension with boilerplate code for unit testing async functions (waiting for expectations)
View XCTestCase+Expectation.swift
//
// AsyncTests.swift
//
import XCTest
// MARK: Async Helper Extension
extension XCTestCase {
@johndpope-karhoo
johndpope-karhoo / Fastfile
Created Sep 23, 2016 — forked from dalu93/Fastfile
Fastfile example
View Fastfile
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 / simulator_populator
Last active Sep 13, 2016 — forked from cabeca/simulator_populator
This script removes and recreates all simulators in Xcode 6.
View simulator_populator
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