Skip to content

Instantly share code, notes, and snippets.

Avatar

Austin Wood indiesquidge

  • San Francisco, CA
View GitHub Profile
View a_test.md

Credit Card Validator!

now with automated tests

Austin Wood

To Run

  1. run ruby credit_check_test.rb

To Debug via Pry

  1. Make sure you have installed Pry (gem install pry)
View gist:c2d133ccb17a5d845586
@indiesquidge
indiesquidge / vim.log
Last active Aug 29, 2015
Logging file for opening Vim Buffer (if super slow)
View vim.log
# vim <filename.ext> --startuptime <log-file>
# eg. vim hello_world.rb --startuptime vim.log
================ Output ================
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.008 000.008: --- VIM STARTING ---
View capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@indiesquidge
indiesquidge / homebrew.md
Last active Nov 15, 2020
How to and Best of Homebrew
View homebrew.md

Homebrew

How To

Homebrew is a package management system for OS X. You can read more about it here, or simply run

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

to install it.

@indiesquidge
indiesquidge / presenter.md
Created Apr 21, 2015
Intro to Presenters
View presenter.md

Presenters & Decorators

Decorators

Decorators are used to add new functionality to an already existing object by "wrapping" it with new methods, without effecting other instances of that object. Thus, decorators are a perfect example of the Open/closed principle, in which an object is "open for extension" but "closed for modification"; you should be able to add new behavior to application without changing it's underlying source code. If any of this is a bit hard to swallow, I would

@indiesquidge
indiesquidge / custom_array.rb
Last active Aug 29, 2015
Custom Array Flatten
View custom_array.rb
# Partner: Chris Luhring, @cluhring
require_relative "custom_array"
RSpec.describe "CustomArray" do
it "can flatten some custom array of numbers" do
c = CustomArray.new([[1,2],[3,[4,5]]])
expect(c.flatten).to eq([1, 2, 3, 4, 5])
end
@indiesquidge
indiesquidge / learn-you-a-turing.md
Last active Feb 4, 2016
Increase your efficiency as a student at Turing
View learn-you-a-turing.md

Learn You a Turing for Great Good!

It’s hard to keep track of everything you’re learning

  • Once a day, try and recap what you learned that day; write about it!
  • Once a week, recap the week
  • Every module, recap the module
  • Keep your "Turing environment" clean and organized

"You should sit in meditation for 20 minutes a day, unless you're too busy; then you should sit for an hour.”

View 1503_object_model_notes.md

Object Model

Bindings

  • are nodes in the stack
  • store local_variables
  • have a return value
  • have a self
View tmux.rb
class Tmux < Formula
desc "Terminal multiplexer"
homepage "https://tmux.github.io/"
url "https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz"
sha256 "31564e7bf4bcef2defb3cb34b9e596bd43a3937cad9e5438701a81a5a9af6176"
bottle do
cellar :any
sha256 "165ad1037a3993fd12c745cdf77bdd31133c0e13188ede37096532dddb5591c6" => :el_capitan
sha256 "44f62e8bed576ac82d5e2f768a6f3c6efb86fe7e45b37873d137294c8ef887b6" => :yosemite
You can’t perform that action at this time.