Checkout the blog post for the whole story.
Setup Bower and install components:
npm install -g bower
bower installBefore deploying to Heroku, switch to the multi buildpack:
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs mysql | |
| # Required-Stop: $local_fs $remote_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: unicorn initscript | |
| # Description: Unicorn is an HTTP server for Rack application | |
| ### END INIT INFO |
| require 'date' | |
| require 'yaml' | |
| data = [] | |
| File.open "albert.rec" do |f| | |
| f.each_slice(2) do |slice| | |
| # key = items.delete_at(0).downcase | |
| reads = slice.map do |line| | |
| items = line.chomp.split(/\s+/) |
| require 'yaml' | |
| require 'csv' | |
| class PlotLaser < Processing::App | |
| def setup | |
| @data = YAML.load File.open("albert.yml") | |
| @smooth = false | |
| no_smooth | |
| @frame_index = 0 |
| # Gemfile | |
| ruby '2.1.1' | |
| gem 'nokogiri' | |
| gem 'pry' | |
| # scrapey.rb | |
| require 'rubygems' | |
| require "net/http" |
| # Live cells with: | |
| # < 2 living neighbors dies to underpop | |
| # > 3 living neighbors dies to overpop | |
| # Otherwise, lives! | |
| # | |
| # Dead cells with exactly 3 living neighbors is born | |
| # | |
| # . 0 . | |
| # . 0 . | |
| # . 0 . |
Checkout the blog post for the whole story.
Setup Bower and install components:
npm install -g bower
bower installBefore deploying to Heroku, switch to the multi buildpack:
| module Fishish | |
| def kind | |
| "fish#{super}" | |
| end | |
| end | |
| module Dogish | |
| def kind | |
| "dog#{super}" | |
| end |
Extracted by SnappySnippet.
| alias la='ls -la' | |
| alias gl='git pull' | |
| alias gp='git push' | |
| alias gb='git branch' | |
| alias gco='git checkout' | |
| alias gs='git status -sb' | |
| alias gc='git commit -m' | |
| alias gaa='git add -A' |
| #!/usr/bin/env bash | |
| # ~/.macos — https://mths.be/macos | |
| # Close any open System Preferences panes, to prevent them from overriding | |
| # settings we’re about to change | |
| osascript -e 'tell application "System Preferences" to quit' | |
| # Ask for the administrator password upfront | |
| sudo -v |