This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to solve a sudoku puzzle | |
I. Find an empty cell | |
* Starting at 0,0, scan the board looking for 0 | |
* Scan is some kind of nested loop! (Outer loop looking on x axis, inner -> y axis) | |
* If found | |
* Coordinates of first found empty cell gets stored (probably in an instance variable) | |
* Move on II | |
* If not found |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THINGS FOR LATER | |
* How do reg ex match groups work? What's with the non-interpolation interpolation? Why does the match group need to be in a string? | |
A la: | |
def hide_all_ssns(string) | |
string.gsub(/(\d{3})-(\d{2})-(\d{4})/, 'XXX-XX-\3' ) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FAUN | |
* Why not use oAuth | |
* Dates / times on the session RSVP section on the Volunteer page is confusing. Better text plz. | |
* Headers on RSVP form look terrible | |
* When I signed up it took me to the account page -- what do I do next? | |
* Connect to Meetup should redirect back to the event index instead of to your account page | |
* Add some kind of flash message for "You have successfully connected your account to Meetup!" | |
LILLIE | |
* Form submit buttons need any style whatsoever |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Anyone can have a workshop. The materials are open. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Front End 101 | |
* Totally new to HTML and CSS | |
* Perhaps has seen it before, but not written much (if any) | |
* Not sure what tags, attributes, or selectors are | |
* <img>, <a>, and <p> are exciting and new | |
Front End 102 | |
* Knows the basic idea behind HTML and has possibly written some | |
* New to CSS | |
* Perhaps has worked with a WYSIWIG editor but hasn't coded an HTML document from scratch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git Cheat Sheet | |
first time: | |
git config --global user.name "My Name" | |
git config --global user.email "[email protected]" | |
each repo: | |
git init | |
LOCAL THINGS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$vr->sendEmailCampaignTest( | |
array( | |
'session_id' => $sid, | |
'campaign_id' => $cid, | |
'recipients' => array( | |
array( | |
array( | |
'name' => "email_address", | |
'value' => '[email protected]', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def factorial(n) | |
if n == 0 | |
return 1 | |
end | |
total = n | |
(n-1).times do | |
total = total * (n - 1) | |
n -= 1 | |
end | |
total |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RPNCalculator | |
def evaluate(exp) | |
exp_array = exp.split(" ").to_a | |
rpn_array = [] | |
exp_array.each do |i| | |
if i.match(/\d/) != nil | |
rpn_array << i.to_i | |
else | |
rpn_array << i | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mode(array) | |
frequency_hash = {} | |
array.each do |index| | |
frequency_hash[index] = array.count(index) | |
end | |
# now we have a hash of { number: frequency } | |
puts "here's the frequency of each thing, key = number, value = frequency of that number" | |
puts frequency_hash | |