Skip to content

Instantly share code, notes, and snippets.

View kharmabum's full-sized avatar
💭
🧀

Juan-Carlos Foust kharmabum

💭
🧀
View GitHub Profile
@kharmabum
kharmabum / locationManager-didChangeAuthStatus-handler.m
Created February 13, 2014 02:27
LocationManager: didChangeAuthorizationStatus: - handler
- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status {
NSLog(@"%s", __PRETTY_FUNCTION__);
switch (status) {
case kCLAuthorizationStatusAuthorized:
NSLog(@"kCLAuthorizationStatusAuthorized");
// Re-enable the post button if it was disabled before.
self.navigationItem.rightBarButtonItem.enabled = YES;
[locationManager startUpdatingLocation];
break;
case kCLAuthorizationStatusDenied:
@kharmabum
kharmabum / mongoose-list.js
Last active August 29, 2015 13:56
Mongoose list/load static functions.
/**
* Load
*
* @param {Object} options
* @param {Function} cb
* @api private
*/
schema.statics.load = function (options, cb) {
var criteria = options.criteria || {}
@kharmabum
kharmabum / explore.md
Last active September 28, 2015 06:22
Oh, the places you'll go.

North America

  • Seattle
    • Alki beach
  • Boston
  • NYC
  • Portland
  • Chicago
  • Denver
  • Boulder
@kharmabum
kharmabum / technical-interview-strategy.md
Last active November 6, 2016 03:49
Technical interview preparation + strategy.
@kharmabum
kharmabum / FTInterview.h
Last active January 3, 2016 12:48
Objective-C technical interview preparation.
//
// FTInterview.h
// Created by IO on 1/15/14.
//
//
#import <Foundation/Foundation.h>
#pragma mark - Type Definitions
@kharmabum
kharmabum / cover-letter.md
Last active January 1, 2016 17:39
Cover letter.

Friends,

Two years ago I chose to focus my major on the study of biocomputation. My interests then lay and still remain at the intersection of our data and self-representation. Dissapointed with the progress being made at the clinical end of genomics, I opted to forgo promising academic research to join what I believed was an equally promising health prediction startup. Without a clear plan for how I intended to participate, I nevertheless sensed an urgent creative potential.

What began as a summer internship with an undefined role quickly evolved into an unexpected, catalytic journey. In the intervening period, harboring an acquisition and graduation, I've stumbled upon an inestimable quantity of insights. From agile development, organizational structure, and interface design to consumer behavior, mobile health, and wearable computing, I've

@kharmabum
kharmabum / mac-settings.md
Last active December 25, 2015 03:29
Fixes for common mac annoyances

Instructions

Open the Terminal mac application and enter any of the statements below into the command line. Note that some of these changes require a logout/restart to take effect.

Commands

Disable the sound effects on boot

sudo nvram SystemAudioVolume=" "
@kharmabum
kharmabum / .osx
Created September 15, 2013 03:49
mac osx defaults
#!/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 &
@kharmabum
kharmabum / isValidDateLiteral.js
Created September 13, 2013 22:54
text date input validation
isValidDateLiteral: function (input){
var validformat = /^\d{1,2}\/\d{1,2}\/\d{4}$/; //Basic check for format validity
if (!input.match(validformat)) return false;
var monthfield=input.split("/")[0];
var dayfield=input.split("/")[1];
var yearfield=input.split("/")[2];
var dayobj = new Date(yearfield, monthfield-1, dayfield);
if ((dayobj.getMonth()+1!=monthfield)||(dayobj.getDate()!=dayfield)||(dayobj.getFullYear()!=yearfield)) {
return false;
} else {
@kharmabum
kharmabum / ec2-setup.md
Last active December 20, 2015 15:19
setup new ec2 ubuntu instance

ec2 ubuntu setup

become god

sudo su

enable multiverse and universe - http://goo.gl/73C8sq

vim /etc/apt/sources.list