- Change pointer when hovering over 'change key' in menu
- New users will not know the radio is public/private
- Word line-wrapping
- Change placement of 'New Note' in menu.. Possibly a '+' icon
- set a note to default open
- esc shorcut to exit menu -> back to note
- Copy/pasta
This file contains 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
Capybara::Screenshot.screenshot_and_save_page | |
=Debugging= | |
require 'pry' | |
binding.pry | |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
This file contains 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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
This file contains 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
{ | |
jokes: [ | |
{ | |
question: "Can a cat play patty-cake?", | |
answer: "Pawsibly!" | |
}, | |
{ | |
question: "Why was the cat so small?", | |
answer: "Because it only drank condensed milk!" | |
}, |
This file contains 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
# uses gem combination_generator | |
# generates all possible 8 character combinations for letters A-Z | |
# writes combinations to file combinations.txt | |
require 'combination_generator' | |
alphabet = ('a'..'z').to_a.map(&:upcase!) | |
combinations = [] | |
CombinationGenerator.new(8, alphabet).each {|combo| combinations << combo } | |
f = File.new 'combinations.txt', 'w' |
This file contains 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
#!/usr/bin/ruby | |
require 'date' | |
class Date | |
def self.months_between(d1, d2) | |
months = [] | |
start_date = Date.civil(d1.year, d1.month, 1) | |
end_date = Date.civil(d2.year, d2.month, 1) |
This file contains 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
Manage Emulators | |
android avd | |
Run Emulator | |
emulator -avd <AVD_Name> | |
Install apk onto emulator | |
adb -e install <path to apk> | |
This file contains 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 sort(original) | |
sorted = [] | |
original.each do |original_num| | |
if sorted.empty? || original_num > sorted.last | |
sorted << original_num | |
next | |
else | |
sorted.each do |sorted_num| | |
if original_num <= sorted_num | |
sorted.insert(sorted.index(sorted_num), original_num) |
This file contains 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
# Usage: | |
# - Prefix is set to Ctrl-a (make sure you remapped Caps Lock to Ctrl) | |
# - All prefixed with Ctrl-a | |
# - Last used window: / | |
# - Last used pane: ; | |
# - Vertical split: v | |
# - Horizontal split: s | |
# - Previous window: [ | |
# - Next window: ] | |
# - Choose session: Ctrl-s |
OlderNewer