Using Graphviz/Dot Diagrams
brew install graphviz
dot graph.dot -Tpng > graph.png| <%= 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 |
| 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| __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; |
| require 'open-uri' | |
| require 'csv' | |
| class Student | |
| attr_accessor :id | |
| attr_accessor :stage | |
| def initialize(id:, stage:) | |
| self.id = id | |
| self.stage = stage |