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
PROXIES = %W( | |
118.97.208.194:3128 | |
118.97.247.107:3128 | |
118.97.211.5:3128 | |
175.136.226.87:3128 | |
200.35.90.38:3128 | |
95.70.208.245:8080 | |
120.203.214.182:83 |
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
source 'https://rubygems.org' | |
gem 'rails', '4.1.1' | |
gem 'pg' | |
gem 'sass-rails', '~> 4.0.3' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.0.0' | |
# See https://github.com/sstephenson/execjs#readme for more supported runtimes |
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
ul.ui-autocomplete { | |
margin-top: 2px; | |
-webkit-border-radius: 4px; | |
-moz-border-radius: 4px; | |
border-radius: 4px; | |
position: absolute; | |
top: 100%; | |
left: 0; | |
z-index: 1000; |
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
class Authentication < ActiveRecord::Base | |
belongs_to :user | |
attr_accessible :provider, :uid, :user_id | |
validates :provider, :uid, presence: true | |
end |
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
scope :masseurs_with_name, ->(name) { | |
includes(:users).where('users.first_name like :name OR users.last_name like :name', name: "%#{name}%" ) | |
} |
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" RUNNING TESTS | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
map <leader>t :call RunTestFile()<cr> | |
map <leader>T :call RunNearestTest()<cr> | |
" map <leader>a :call RunTests('')<cr> | |
map <leader>c :w\|:!script/features<cr> | |
map <leader>w :w\|:!script/features --profile wip<cr> | |
function! RunTestFile(...) |
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
____ __ __ / /_ __ __ | |
/ __// / / // __ \/ / / / | |
/ / / /_/ // /_/ / /_/ / | |
/_/ \____//_____/\__, / | |
/____/ |
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
require 'ostruct' | |
alternatives = [ | |
OpenStruct.new(name: "A1", weight: 1), | |
OpenStruct.new(name: "A2", weight: 1), | |
OpenStruct.new(name: "A3", weight: 1), | |
OpenStruct.new(name: "A4", weight: 1), | |
OpenStruct.new(name: "B1", weight: 1), | |
OpenStruct.new(name: "B2", weight: 1), | |
OpenStruct.new(name: "B3", weight: 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
// Original article: https://m.pardel.net/tdd-in-xcode-playgrounds-544a95db11e2 | |
import XCTest | |
struct Todo { | |
} | |
class TodoTests: XCTestCase { | |
override func setUp() { |
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
people = [{name: 'Alice'}, {name: 'Bob'}, {name: 'Bill'}, {name: 'Alex'}, {name: 'John'}]; | |
people.reduce((obj, person) => { | |
const firstLetter = person.name[0].toUpperCase(); | |
return { | |
...obj, | |
[firstLetter]: [...(obj[firstLetter] || []), person] | |
} | |
}, {}); |
OlderNewer