Skip to content

Instantly share code, notes, and snippets.

Jesse Shawl jshawl

Block or report user

Report or block jshawl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.html
<!doctype html>
<html>
<head></head>
<body>
<script>
var color = colorize(3,2,1)
function colorize(red, yellow, green){
yells = yellow / 2
red += yells
View solution-oop.py
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):
View app.js
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 +"!")
})
View Story.swift
//
// Story.swift
// MashItUp
//
// Created by Jesse Shawl on 5/5/15.
// Copyright (c) 2015 Jesse Shawl. All rights reserved.
//
import UIKit
View application.js
// TrilloView
// create new cards
// handle form submission
// put existing cards into
// either done or todo lists.
// Trillo Object
// stores a reference to
// all cards
View rails-commands.md

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 Aug 29, 2015
A Markdown Rendered Gist for Duncan
View 2015-04-13.md

Level 1

  • an unordered
  • list here
  • should probably autocomplete

Level 2

  1. An ordered list
  2. Where da styles at
View battleship.rb
grid = [
[0,0,0],
[0,0,0],
[0,0,0]
]
ships = [
[ [0,0],[0,1] ],
[ [1,2],[2,2] ]
]
View warmupw01d02.md

Mission: Impossible!

We, the Impossible Missions Force, have become aware that Doctor Nefarious is planning on using his Nefarious Computer (a standard Macbook) to initiate a nuclear launch sequence that will destroy the entire world.

Our sources have told us that the nuclear launch sequence is run from a shell script, and have also given us a tree showing the contents of the Doctor's computer (the flash drive has been added to show where in the structure it will appear):

NO_NUCLEAR_LAUNCH_SEQUENCES_HERE/
	nopeNotALaunchSequence.sh
TOP_SECRET/
	SERIOUSLY_TOP_SECRET/
View class_methods.rb
class Apartment
@@all = []
def initialize
@@all << self
end
def self.count
@@all.length
end
end
You can’t perform that action at this time.