Skip to content

Instantly share code, notes, and snippets.

View jonmorehouse's full-sized avatar
💻
founder at nuon.co

Jon Morehouse jonmorehouse

💻
founder at nuon.co
View GitHub Profile
@jonmorehouse
jonmorehouse / backlog.sh
Created March 12, 2014 05:56
Backlog manager for daily file management
function backlog {
# assumes you are in the backlog directory
# create file contents as needed
# link readme each day - easy github management
# create proper commit message
file=$(date | awk '{ print tolower($1)"-"tolower($2)"-"$3 }')
file_path=current/$file.md
# generate file contents
@jonmorehouse
jonmorehouse / osx.sh
Created April 11, 2014 02:53
OSX customization / configuration
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

Keybase proof

I hereby claim:

  • I am jonmorehouse on github.
  • I am jonmorehouse (https://keybase.io/jonmorehouse) on keybase.
  • I have a public key whose fingerprint is B7DE 28A9 E796 9029 8560 2A57 D61D D2B4 DD96 6C66

To claim this, I am signing this object:

class UINavigationController
alias_method :superPopViewControllerAnimated, :popViewControllerAnimated
def popViewControllerAnimated(animated)
# call the will_present method of parent
if self.viewControllers[0].respond_to? :will_appear
self.viewControllers[0].send(:will_appear)
end
@jonmorehouse
jonmorehouse / Rakefile
Last active August 29, 2015 14:04
Sample Rakefile using both firebase and objective-leveldb
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion2.29/lib")
require 'motion/project/template/ios'
begin
require 'bundler'
Bundler.require
rescue LoadError
end
class FeedScreen < PM::Screen
def on_load
@control ||= begin
c = UISegmentedControl.plain ["all", "following"]
c.selectedSegmentIndex = 0
c.accessibilityLabel = "nav_control"
c.on :change.uicontrolevent do
switch_screens
end
c

Keybase proof

I hereby claim:

  • I am jonmorehouse on github.
  • I am jonmorehouse (https://keybase.io/jonmorehouse) on keybase.
  • I have a public key whose fingerprint is E1E9 6908 8283 DB60 7F85 4058 B790 9523 9D63 CD2F

To claim this, I am signing this object:

package main
import (
"fmt"
"math/rand"
"time"
)
type ErrorA struct {}
func (e *ErrorA) Error() string { return "error a" }
package main
import (
"fmt"
"sync"
"testing"
)
/*
Simple API for aggregating large sets of data that are cached in application memory.
package main
import (
"fmt"
"math/rand"
"time"
)
type Node struct {
value int