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
var LTD = {}; | |
LTD.product = (function() { | |
//private functions | |
function somethingHandy() { | |
... | |
} | |
return { | |
//public functions... |
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
# /Gemfile | |
source 'http://rubygems.org' | |
gem 'rspec' | |
gem 'capybara' | |
gem 'selenium-webdriver' | |
gem 'capybara-webkit' |
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
development: | |
adapter: postgresql | |
database: <db_name> | |
encoding: utf8 | |
username: <username> | |
password: | |
host: localhost | |
# ... |
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
watch(".*\..*") do |match| | |
puts `echo "hello"` | |
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
color railscasts | |
set guifont=Monaco:h16 | |
set antialias | |
" Whitespace stuff | |
autocmd FileType javascript set tabstop=4 |
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
source 'http://rubygems.org' | |
gem 'rake' | |
gem 'rspec' | |
gem 'capybara' | |
gem 'selenium-webdriver' | |
gem 'capybara-webkit' |
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
`ps aux | awk '/spork/&&!/awk/{print $2;}'`.split("\n").map { |pid| pid.to_i } |
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
$large_display: '(min-width: 1200px)'; | |
body { | |
@media #{$large_display} { | |
background: blue; | |
} | |
} |
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
//make an 'invalid', required input look like a normal form field | |
//with plain bootstrap, this field shows up as red before the user has submitted the form | |
//ideally,it would not be considered :invalid until after the form has been submitted | |
//alas, this is not currently the case | |
input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid { | |
color: #555; | |
border-color: $inputBorder; | |
&:focus { | |
border-color: rgba(82,168,236,.8); |
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
require 'minitest/autorun' | |
require_relative '../search_looping' | |
class TestSearchLooping < MiniTest::Unit::TestCase | |
def test_chop | |
assert_equal -1, SearchLooping.chop(3, []) | |
assert_equal -1, SearchLooping.chop(3, [1]) | |
assert_equal 0, SearchLooping.chop(1, [1]) |
OlderNewer