Skip to content

Instantly share code, notes, and snippets.

View dblarons's full-sized avatar

Aaron Smith dblarons

View GitHub Profile
<tcomb.Form type={bankLocation.getType()} options={bankLocation.getOptions()} />
const international = StructBuilder
.setField('country', CountriesBuilder.setLabel('Country'));
const stateCity = StructBuilder
.setField('city', TextBuilder
.setLabel('City'))
.setField('state', UnitedStatesBuilder
.setLabel('State'));
const us = international
const bankLocation = FormPageBuilder
.setLabel('Investor\'s Bank Location')
.setField('form', UnionBuilder
.setUnion([us, international])
.setDispatch(({ country = 'US' }) => (
country === 'US'
? us
: international
)));
const stateCity = StructBuilder
.setField('city', TextBuilder
.setLabel('City'))
.setField('state', UnitedStatesBuilder
.setLabel('State'));
const us = international
.setField('stateCity', stateCity);
const international = StructBuilder
.setField('country', CountriesBuilder.setLabel('Country'));
render() {
const { isUSA } = this.props;
const cityState = (
<div>
<City />
<State />
</div>
);
@dblarons
dblarons / Enums.swift
Created March 7, 2015 19:01
VandyApps - March 12, 2015 iOS lesson
import UIKit
/* Enumerations */
// MOTIVATING EXAMPLE
// I have 3 different kinds of users: administrator, employee, user.
// Each type of user has a different priviledge level:
// Admins: See tasks for all users in application and all below.
@dblarons
dblarons / war_game.py
Last active August 29, 2015 14:15
Card game of war for VandyApps Boot Camp (Spring 2015)
http://repl.it/languages/python
#### First Draft ####
deck1 = [1, 2, 3, 7, 8]
deck2 = [4, 5, 6, 9, 10]
# First write this in while loop and then move out when
# introducing methods
def announce_round(c1, c2):
print "Player 1\tPlayer 2"
@dblarons
dblarons / task_list.py
Created September 14, 2014 16:59
Boot Camp Task List Manager
## Task List
# At beginning:
# - go over types (string, int)
# - "and" and "or"
def start_task_list():
# creating an instance of a class
task_list = TaskList()
@dblarons
dblarons / gist:71f2b189b997ac398ee2
Created September 1, 2014 20:00
VandyApps Boot Camp "Intro to Programming" talk code
## Task List
# At beginning:
# - go over types (string, int)
# - "and" and "or"
def start_task_list():
# creating an instance of a class
task_list = TaskList()