Skip to content

Instantly share code, notes, and snippets.

View underhilllabs's full-sized avatar

Bart Lantz underhilllabs

View GitHub Profile

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info

Reference

You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

@underhilllabs
underhilllabs / Capybara.md
Created January 9, 2018 14:14 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@underhilllabs
underhilllabs / us-state-names-abbrevs.php
Created July 5, 2016 18:14 — forked from maxrice/us-state-names-abbrevs.php
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',
@underhilllabs
underhilllabs / springer-free-maths-books.md
Created December 28, 2015 21:12 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@underhilllabs
underhilllabs / The Technical Interview Cheat Sheet.md
Last active August 29, 2015 14:28 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@underhilllabs
underhilllabs / gist:169c60675e8adb10c82d
Last active August 29, 2015 14:27 — forked from acwright/gist:1944639
Sinatra / ActionMailer / Sendgrid / Heroku
require 'sinatra'
require 'action_mailer'
class Mailer < ActionMailer::Base
def contact
mail(
:to => "test@example.com",
:from => "test@example.com",
:subject => "Test") do |format|
format.text
@underhilllabs
underhilllabs / gist:fe9b2c5596f37eb42c93
Last active August 29, 2015 14:27 — forked from caleywoods/gist:1197657
CentOS install
#!/usr/bin/env bash
echo "Checking for SSH key, generating one if it exists ..."
[[ -f ~/.ssh/id_rsa.pub ]] || ssh-keygen -t rsa
echo "Copying public key to clipboard. Paste it into your Github account ..."
[[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | xclip
open https://github.com/account/ssh
echo "Using yum to install OS packages so let's update it first ..."
#include <Adafruit_NeoPixel.h>
// Pin used on Arduino board
#define PIN 2
// Number of NeoPixels
#define PIXELS 24
// Number of pixels on either side continuously orange to indicate side of vehicle
#define FIXEDPIXELS 1
// Parameter 1 = number of pixels in strip
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
context "GET index" do
#context "POST create" do
#context "GET show" do
#context "PATCH update" do (or PUT update)
#context "DELETE destroy" do
#context "GET new" do