Skip to content

Instantly share code, notes, and snippets.

View jonahgeorge's full-sized avatar

Jonah George jonahgeorge

View GitHub Profile
<%= form_for @form do |f| %>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<%= f.label :name %>
<%= f.text_field :name, class: "form-control", placeholder: "Keep it clean...", required: true %>
</div>
<div class="form-group">
<%= f.label :label %>
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require "json"
require "open-uri"
url = "https://api.github.com/repos/jonahgeorge/paperbacks/commits"
commits = JSON.parse(open(url).read)
nodes = []
commits.each do |c|
c["parents"].each do |p|
nodes << "\"#{c["sha"]}\" -> \"#{p["sha"]}\";"

Using Graphviz/Dot Diagrams

brew install graphviz
dot graph.dot -Tpng > graph.png
@jonahgeorge
jonahgeorge / .gitignore
Last active January 30, 2016 19:24 — forked from Lewuathe/shift.py
Optimal assignment of GTAs to Courses via ILP
__pycache__
class HighrisesController < ApplicationController
before_action :set_highrise, only: [:show, :edit, :update, :destroy]
# GET /highrises
# GET /highrises.json
def index
@highrises = Highrise.all
end
# GET /highrises/1
class CourseCatalogSyncJob < ActiveJob::Base
queue_as :default
def perform(*args)
OsuCcScraper::Department.all.each do |department|
@department = Department.where({
subject_code: department.subject_code
}).first
unless @department
<?php
// Fly you fools!
class ActiveRecord {
use ActiveRecordAll;
use ActiveRecordFind;
use ActiveRecordFindBy;
use ActiveRecordInsert;
use ActiveRecordUpdate;
@jonahgeorge
jonahgeorge / resumes.rb
Created October 8, 2015 16:58
MECOP Merge Resume PDFs using Ghostscript
require 'open-uri'
require 'csv'
class Student
attr_accessor :id
attr_accessor :stage
def initialize(id:, stage:)
self.id = id
self.stage = stage