Skip to content

Instantly share code, notes, and snippets.

View rrcobb's full-sized avatar

Rob Cobb rrcobb

  • --
  • United States
View GitHub Profile
@rrcobb
rrcobb / env_setup.txt
Created August 3, 2022 21:25
Kibo Windows Local Environment Setup Summary
# Copy and paste each line into Powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
scoop install git
scoop install cmder
scoop bucket add extras
scoop install vscode
scoop install python
@rrcobb
rrcobb / instructions.md
Created July 15, 2022 16:29
Mad Libs Project Instructions

Mad Libs: Instructions

Mad Libs is a phrase template word game. One player prompts others for a list of words to substitute for blanks in a story, then reads the story aloud.

If you've never seen mad libs before, it's an interactive story generator. You can see and online example here.

In this project, you are going to write a Mad Libs game. The program should prompt the user for some words, and then fill in the blanks in the story with those words.

To write the program:

  • Write a story of your own and keep it as strings in the program.
@rrcobb
rrcobb / .bashrc
Last active May 10, 2021 14:08
add_alias bash function: `add_alias lsa ls -a`
# Usage add_alias [name] [command]
# Example: add_alias today date +%Y-%m-%d
# creates the alias today, which executes "date +%Y-%m-%d"
# make sure to add a line "source ~/.bash_aliases" to your config
function add_alias ()
{
local cmd=$1;
shift;
local rest="$@";
echo "alias $cmd=\"$rest\"" >> ~/.sh_aliases;
@rrcobb
rrcobb / negated_change_matcher.rb
Created January 23, 2018 00:09
Rspec negated change matcher
# This should be in rspec core, but add it here so we can chain negative change expectations, like
# expect { do_thing }.to change {a}.and not_change {b}.and change {b}
RSpec::Matchers.define_negated_matcher :not_change, :change
@rrcobb
rrcobb / negated_change_matcher.rb
Created January 23, 2018 00:08
Rspec negated change matcher
# This should be in rspec core, but add it here so we can chain negative change expectations, like
# expect { do_thing }.to change {a}.and not_change {b}.and change {b}
RSpec::Matchers.define_negated_matcher :not_change, :change
@rrcobb
rrcobb / reload.js
Created November 29, 2017 06:29
Quickly iterate on a file from the node command line
/*
* Usage:
* ```
* $ node
* > const reload = require('./reload.js');
* > // (make some changes to reload.js)
* > reload()
* > // Voilà! your changes are loaded into the context!
* ```
*/
@rrcobb
rrcobb / export_for_test.js
Created November 17, 2017 17:50
helper for conditionally exporting a function for testing
/*
* Conditionally export a function for testing
*
* Usage:
* (src/file.js)
* $test(privateHelper, module, [nameForExport])
*
* (src/file_test.js)
* import { name } from './file'
*
@rrcobb
rrcobb / details.md
Last active October 16, 2017 16:54
Distributed Systems Book Club @fin

Fin is going to be hosting a book club for engineers looking to up their game.

We're starting out by reading van Steen and Tanenbaum's Distributed Systems 3rd Edition, because they are relevant to the systems we are building at Fin and we want to feel confident in our foundations.

You can get a copy of the book for free online from the authors by putting your email in a box here: https://www.distributed-systems.net/index.php/books/distributed-systems-3rd-edition-2017/

Format:

- 30-40 min quiet time for reading
- 20-30 min for discussion
@rrcobb
rrcobb / overreact.rb
Last active July 30, 2016 01:00 — forked from ndevvy/overreact.rb
react scaffold generator
#!/usr/bin/env ruby
# edited from ndevvy's overreact gist
# added flow typing and new import/export syntax
# to use: run from command line in the project root dir with the camelcased name of the component as the argument
# e.g. `ruby ~/code/overreact.rb CalculatorComponent`
# optional arguments:
# - no-test to skip the test file
@rrcobb
rrcobb / gist:8e2e26b9c41a0c904be3
Created July 10, 2015 17:01
stick it in your bash profile, then github-create to make a learn-co-curriculum repo. Need to configure your ssh credentials first
github-create() {
repo_name=$1
dir_name=`basename $(pwd)`
if [ "$repo_name" = "" ]; then
echo "Repo name (hit enter to use '$dir_name')?"
read repo_name
fi