Skip to content

Instantly share code, notes, and snippets.

@BrainScraps
BrainScraps / quickly.rb
Last active December 18, 2015 00:49
This is a script that I made for quickly creating a new directory, GitHub repository, local respository, and linking the two up - all with one command! Dependencies: git github account & credentials the 'octokit' gem (gem install octokit) Usage: First, edit the script to include your GitHub username and password. ruby quickly.rb newprojectname
#This is a script that I made for quickly creating a new directory, GitHub repository,
#local respository, and linking the two up - all with one command!
#Dependencies:
#git
#github account & credentials
#the 'octokit' gem (gem install octokit)
#Usage:
#First, edit the script to include your GitHub username and password.
@BrainScraps
BrainScraps / gist:5775010
Created June 13, 2013 16:12
I hope that this makes sense in ruby. I used single quotes on the outside - maybe that makes sense in ruby.
isaac_is_hungry = '{"foodstuffs":[
{
"name":"Pizza",
"healthRating": 3,
"tasteRating":8
},
{
"name":"Quinoa",
"healthRating":8,
"tasteRating":2
@BrainScraps
BrainScraps / parsing.rb
Last active December 19, 2015 02:18 — forked from janester/parsing.rb
I did not do the bonuses. But whatever.
require "pry"
require "pry-debugger"
require "soundcloud"
require "nokogiri"
require "open-uri"
#1. Parse through the wdi2 hash and make a function that returns a hash where the
#keys are each persons name and the value is their favorite movies
wdi2 = {:instructors => [
{:name => "jane", :gender => "female", :favorite_movies => ["the dark knight rises", "the dark knight", "batman begins"], :favorite_foods =>["tacos", "tamales", "enchiladas"]},
@BrainScraps
BrainScraps / Gemfile
Last active December 19, 2015 12:09 — forked from janester/quickly.rb
Added .env operations and the two dependency files (lots more documentation)
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'pg'
gem 'nokogiri', '~> 1.5.0'
group :development do
gem 'pry-rails'
gem 'pry-debugger'
@BrainScraps
BrainScraps / Gemfile
Created July 10, 2013 22:31
This is a Gemfile that is testing-ready. I plan on using it in the future!
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'pg'
gem 'nokogiri', '~> 1.5.0'
group :development do
gem 'pry-rails'
gem 'pry-debugger'
gem 'binding_of_caller'
@BrainScraps
BrainScraps / friday_twitter_action.txt
Created January 27, 2017 15:25
Tweet text for the #resistance
The #PublicDemandsAVoice!
Tell the @WhiteHouse to open their comments phone line 202-456-1111 to the public! @POTUS @PressSec