Skip to content

Instantly share code, notes, and snippets.

View jcdavison's full-sized avatar
🎯
Focusing

John Davison jcdavison

🎯
Focusing
View GitHub Profile
@jcdavison
jcdavison / food_by_email.rb
Last active August 29, 2015 14:02
Get your daily dose of food...
# email everyone in the group a list of things we might like to read ?
# steps required to accomplish this, ie, pseudocode
# 1. indentify site to visit # once there decide to access specific
# 2. obtain content in html format of that url
# 3. figure out which part of the html to get (nokogiri)
# 4. Extract that data we want -
# 5. formatting the data in a way that we want (emailing the data)
# 6. email the links
@jcdavison
jcdavison / fibonacci.rb
Last active August 29, 2015 14:02
examples of iterative and recursive fibonacci
# n 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
# fib(n) 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377
# iterative solution
def fib(n)
return n if n == 0 || n == 1
fibs = [0,1]
(n - 2).times do
temp_fib = fibs.reduce(:+)
fibs[0] = fibs[1]
# Method name: commas
# Inputs: A number, n
# Returns: A string representing the input, with commas inserted into the
# correct position.
# Prints: Nothing
# For example,
#
# commas(123) == "123"
# commas(1234) == "1,234"
@jcdavison
jcdavison / web-fundamentals-syllabus.md
Last active August 29, 2015 14:07
CodeUnion.io Fundamentals of Web Development Syllabus

Syllabus: Fundamentals of Web Development

Sprint 1 - Programming Fundamentals

Students will get their hands dirty writing Ruby applications that interact with files, websites, and third-party APIs. Most projects will involve printing out "interesting information" in multiple formats, e.g., text, HTML, CSV, and/or JSON.

The high-level goal is to get students comfortable with the idea of fetching raw data, processing it, and outputting it in a new format. We want students asking questions like:

  • Where does the data I want live?
  • How do I get that data?
@jcdavison
jcdavison / pro-engineering-syllabus.md
Created October 1, 2014 21:05
CodeUnion.io Professional Engineering Syllabus

Syllabus: Rails, TDD, and Professional Engineering

Sprint 1 - Rails, Inside & Out

Students will dive deep into a single project, becoming familiar with all the moving parts of Rails and "The Rails Way." We emphasize debugging, instrumentation, and visibility into the different components of Rails.

Core Concepts & Technologies

  • Rails tooling ("rails" command, rake, etc.)
  • ActiveRecord, Validations, and Migrations
@jcdavison
jcdavison / print_horizontal_pyramid.md
Last active August 29, 2015 14:07
benchmark horizontal stars
require 'benchmark'

def coke(height)
  stars = 1
  height.times do |level|
    puts(" " * (height - (level + 1)) + "*" * stars)
    stars += 2
  end
end
"<!DOCTYPE html>\n<html lang=\"en\" id=\"facebook\" class=\"no_js\">\n<head><meta charset=\"utf-8\" /><script>function envFlush(a){function b(c){for(var d in a)c[d]=a[d];}if(window.requireLazy){window.requireLazy(['Env'],b);}else{Env=window.Env||{};b(Env);}}envFlush({\"ajaxpipe_token\":\"AXjg04KRGN-oBdR_\",\"lhsh\":\"4AQEvBeDg\"});</script><script>CavalryLogger=false;</script><noscript><meta http-equiv=\"refresh\" content=\"0; URL=/?_fb_noscript=1\" /></noscript><meta name=\"referrer\" content=\"default\" id=\"meta_referrer\" /><title id=\"pageTitle\">Welcome to Facebook - Log In, Sign Up or Learn More</title><meta property=\"og:site_name\" content=\"Facebook\" /><meta property=\"og:url\" content=\"https://www.facebook.com/\" /><meta property=\"og:image\" content=\"https://www.facebook.com/images/fb_icon_325x325.png\" /><meta property=\"og:locale\" content=\"en_US\" /><meta property=\"og:locale:alternate\" content=\"www\" /><meta property=\"og:locale:alternate\" content=\"es_LA\" /><meta property=\"og:locale:
@jcdavison
jcdavison / templates
Created February 28, 2015 16:29
ng templates
<script type="text/ng-template" id="select/choices.tpl.html">
<ul class="ui-select-choices ui-select-choices-content dropdown-menu"
role="menu" aria-labelledby="dLabel"
ng-show="$select.items.length > 0">
<li class="ui-select-choices-group">
<div class="divider" ng-show="$select.isGrouped && $index > 0"></div>
<div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind-html="$group.name"></div>
<div class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}">
<a href="javascript:void(0)" class="ui-select-choices-row-inner"></a>
</div>
@jcdavison
jcdavison / couchrocket.md
Last active August 29, 2015 14:16
code-review
@jcdavison
jcdavison / designer.md
Last active August 29, 2015 14:19
KidCasa needs a designer :)

Greetings Friends,

A small but high potential outfit I'm currently working with, KidCasa.co, needs to find a designer "ASAP".

Immediately (like tomorrow and of duration until early June), we need someone who can convert some pre-existing visual designs into ios ready assets of all relevant resolutions and sizes. This is probably a more junior-ish requirement and falls more under the umbrella of making sure design assets are ready for our ios engineer.

On a more consistent basis, we need a designer who wants to work with us to help build all forms of assets to support web, ios and android features on suite of cloud software tools aimed at the daycare management vertical. This is very much a more senior role and for someone who has lots of very hands on design experience with early stage product startups.

We are currently a team of around 10 people, a handful of native engineers, a few web engineers and a few sharp marketing and ops people. We work out of Galnaize, are very 'ship it' focused and a happ