Skip to content

Instantly share code, notes, and snippets.

View oldfartdeveloper's full-sized avatar

Scott Smith oldfartdeveloper

View GitHub Profile
@oldfartdeveloper
oldfartdeveloper / gist:3956644
Created October 26, 2012 03:05 — forked from fkchang/gist:3956417
rails gem file for opal_test
# create app
rails new opal_test
# add to Gemfile below ruby
gem 'haml'
gem 'haml-rails'
gem 'opal-rails'
# generate controller w index action
@oldfartdeveloper
oldfartdeveloper / gist:5842002
Created June 22, 2013 18:29
A simple Ruby structure for experimenting with classes and definitions without having to retype them in (as in `irb`).

Use this as a template from your favorite editer/IDE. Simple replace the comment in the #execute method with your experiment.

class DirtyHarry

  def execute

    # Feeling lucky, punk?

 end
@oldfartdeveloper
oldfartdeveloper / opal_no_find_cuke_gem.md
Last active August 29, 2015 13:55
Opal can't seem to find Cucumber gem.

I'm trying to spike running Cucumber in Opal; it's not find it, and I don't know why.

Here's my app/application file. The only change is the addition of the last 3 lines:

# when using sprockets/rails, we must include the corelib
require 'opal'

[1, 2, 3].each { |a| puts a }
@oldfartdeveloper
oldfartdeveloper / orphanage_trip_instructions.md
Last active June 26, 2017 18:30
Driving Instructions to Orphanage from Dianne's House

Driving Instructions to Orphanage from Dianne's House

These instructions can be accessed two ways:

  • As a paper handout; see Dianne.
  • As a PDF file in your smart phone. The iPhone, for one, has iBooks which can hold a PDF file in your smart phone's memory and access it. Once loaded, you don't have to have a live Internet connection; this is handy when you want to turn off access in México to avoid (expensive!) roaming charges.
@oldfartdeveloper
oldfartdeveloper / gist:bc4ee2ce8978e933424e
Last active August 29, 2015 14:16
Declarative implementation of Imperative Cucumber-like RSpec

Here's the original:

require 'spec_helper'

feature "A user signing up for a beta invitation" do
  scenario "with valid parameters" do
    visit '/'
    fill_in "Name", with: "John Doe"
    fill_in "Email", with: "jdoe@example.com"
@oldfartdeveloper
oldfartdeveloper / larubyconf.org
Created October 23, 2015 23:09
LA RubyConf 2015 Notes

LA RubyConf 2015

  • Hired, a placement company for developers is a sponsor

Build to last - Mike Moore - blomage

TL;DR

  • Write code for other programmers, not machines.
  • Code should represent the best understanding of the programmer when he writes it.
@oldfartdeveloper
oldfartdeveloper / elixirconf_notes.org
Created October 23, 2015 23:14
My Elixirconf 2015 Austin Notes

Advanced Phoenix Traiing

Organization

  • web only has code that has no state. Changes to these files auto- restarts the server.
  • lib functionality manages state. (Note: server does not auto-reload w/ changes to these.

What is above is a property of :reloadable_paths.

### Keybase proof
I hereby claim:
* I am oldfartdeveloper on github.
* I am oldfartdeveloper (https://keybase.io/oldfartdeveloper) on keybase.
* I have a public key ASDjaJO8NVzg3hCTtiT6HRrNYioJ7C_Zf6pK8LkqXCBwiAo
To claim this, I am signing this object:

Multiple MySQL Versions with Homebrew

NOTE: this is me experimenting w/ more recent versions. This isn't working yet.

For homebrew version 1.3.0.

brew -v # => Homebrew 1.3.0

Install the current version of mysql.

@oldfartdeveloper
oldfartdeveloper / elmswitch
Last active September 5, 2019 05:02
A Bash script to switch between Elm 0.18 and 0.19
#!/usr/bin/env bash
#
# Switch between using different Elm family revisions; right now can switch between Elm 0.18.0 and Elm 0.19.0 revision
# "ecosystems". From the command line, invokde either
# elmswitch 18
# or
# elmswitch 19
#
# It is planned to add other revisions and patch revisions as desired.
#