Skip to content

Instantly share code, notes, and snippets.

View thatrubylove's full-sized avatar

Jim OKelly thatrubylove

View GitHub Profile
@thatrubylove
thatrubylove / cards.md
Last active August 29, 2015 14:23
TDD Cards in 55 Using MiniTest

Step by Step - Intro to TDD using a deck of playing cards

  1. Create and edit a file called cards.rb

  2. 👇

require 'minitest/autorun'
require 'minitest/pride'
@thatrubylove
thatrubylove / readme.md
Created June 17, 2015 04:51
rubycasts apprenticeship osx setup

SETUP

This README is to help prepare your environment for developing with the Rubycasts team and guide you through setting up the rest of the tools that we use (i.e. Zoom).

Disclaimer: these instructions assume you are on OSX. If you have a different OS, you'll have to find alternate resources to get you through the various steps.

Preparing for setup

source 'https://rubygems.org'
ruby '2.1.3'
gem 'github-linguist'
gem 'html-pipeline'
gem 'github-markdown'
gem 'gemoji'
gem 'rinku'
gem 'pygments.rb'
@thatrubylove
thatrubylove / example.md
Created June 9, 2015 04:39
test gf markdown
module BingoGrader
  extend self

  def bingo?(board)
    bingo_via_row?(board)             ||
      bingo_via_row?(board.transpose) ||
      bingo_via_diag?(board)          ||
      bingo_via_diag?(board.reverse)
 end
@thatrubylove
thatrubylove / sublime.json
Last active August 29, 2015 14:22
sublime correct ruby spaces
{
"tab_size": 2,
"translate_tabs_to_spaces": true,
"detect_indentation": false
}
@thatrubylove
thatrubylove / bingo_grader.rb
Last active August 29, 2015 14:22
bingo grader bitches
module BingoGrader
extend self
def bingo?(board)
bingo_via_row?(board) ||
bingo_via_row?(board.transpose) ||
bingo_via_diag?(board) ||
bingo_via_diag?(board.reverse)
end
User.joins(:loginable).where(:loginable => {:gender => 'Male'})
Here is the TLDR version:
<sevenseacat> rubycasts_io_: welcome back.
...
<rickjamesthethir> I have this dictionary and i need to do 2 things. separate into words/sequences and then check to make sure that if a sequence is a duplicate then it never gets outputted in the final output
...
<rubycasts_io_> rickjamesthethir, looks like a job for each_cons :D
<rickjamesthethir> problem is this dictionary is 25,000 words. It's super slow to run an array.each {|x| *searching for duplicate in the same big array* }
<rubycasts_io_> rickjamesthethir, use ruby 2+ and use .lazy
...
@thatrubylove
thatrubylove / sevenseacat-irc.log
Created May 21, 2015 07:50
How an asshole abuses power - be them female or male
* Now talking on #RubyOnRails
* Topic for #RubyOnRails is: Rules: http://goo.gl/dgSj5 | MINASWAN (Matz is nice and so we are nice) | Can't talk? Register/identify with Nickserv first! 4.2.1 has been released! http://goo.gl/Pgv1KO | Newest releases: 4.2.1, 4.1.10, 4.0.13 | Guides: http://goo.gl/Drh96 | API Docs: http://goo.gl/ErSVb | Mailing List: http://is.gd/3Euc | Logs at http://goo.gl/uma9x
* Topic for #RubyOnRails set by Radar (Thu Mar 19 21:49:10 2015)
-ChanServ- [#rubyonrails] Register with nickserv in order to talk: /msg nickserv help
* nattonerd has quit (Remote host closed the connection)
<rubycasts_io_> ahh, hexchat is a nice improvement
* comrad (~britter@freecnc/comrad) has joined
* dented42 (~dented42@71-219-130-168.slkc.qwest.net) has joined
<sevenseacat> rubycasts_io_: welcome back.
* abuzze (~abuzze@office.xing.com) has joined

RUBYCASTS - ONLY WE

Aim to teach Rubyists to be better at their craft so they can get hired and paid more!