Skip to content

Instantly share code, notes, and snippets.

import React from 'react'
import ReactDOM from 'react-dom'
class GrandParent extends React.Component {
listen(sound){
console.log(sound)
}
render(){
return <div>
<Parent listen={sound => this.listen(sound) }/>
# regular
for i in range(1,101):
if i % 15 == 0:
print "fizzbuzz"
elif i % 3 == 0:
print "fizz"
elif i % 5 == 0:
print "buzz"
else:
@jshawl
jshawl / precess-input-1466110362.scss
Created June 16, 2016 20:52
a precess production
$x: 10px;
.cli{
height:$x;
width:$x;
background:#000;
margin:1em;
box-shadow:
$x 0 0 #fff
,2 * $x 0 0 #fff
,3 * $x 0 0 #fff
<!doctype html>
<html>
<head></head>
<body>
<script>
var color = colorize(3,2,1)
function colorize(red, yellow, green){
yells = yellow / 2
red += yells
@jshawl
jshawl / solution-oop.py
Created May 27, 2015 13:18
Python FizzBuzz
class FizzBuzz:
def __init__(self,num):
self.count(num)
def count(self,num):
if num >= 1:
self.count(num - 1)
self.fizz_buzz(num)
def fizz_buzz(self,num):
var express = require("express")
var app = express()
app.get("/", function( req, res ){
res.send("Hello world! <a href='/jesse'>Say Hi to Jesse</a>")
})
app.get("/:name", function( req, res ){
res.send("Hello "+ req.params.name +"!")
})
//
// Story.swift
// MashItUp
//
// Created by Jesse Shawl on 5/5/15.
// Copyright (c) 2015 Jesse Shawl. All rights reserved.
//
import UIKit
// TrilloView
// create new cards
// handle form submission
// put existing cards into
// either done or todo lists.
// Trillo Object
// stores a reference to
// all cards

Common Rails Commands

rake db:create

  • Creates all the databases specified in config/database.yml

rake db:migrate

  • Run existing migrations in db/migrate
  • Generates the schema.rb file
@jshawl
jshawl / 2015-04-13.md
Last active August 29, 2015 14:19
A Markdown Rendered Gist for Duncan

Level 1

  • an unordered
  • list here
  • should probably autocomplete

Level 2

  1. An ordered list
  2. Where da styles at