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
ruby-1.9.2-p180 :006 > y CheapestFlight.collect_data(json) | |
--- | |
- :stops: "0" | |
:faretype: AMADEUS_PUBLISHED | |
:farebase: "[[\"USALE\"]]" | |
:airlines: CY | |
:is_mixed: "0" | |
:roundtrip: false | |
:arr: SKG | |
:dep: ATH |
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
ruby-1.9.2-p180 :006 > y CheapestFlight.collect_data(json) | |
--- | |
- :stops: "0" | |
:faretype: AMADEUS_PUBLISHED | |
:farebase: "[[\"POWA3\"]]" | |
:airlines: A3 | |
:is_mixed: "0" | |
:roundtrip: false | |
:arr: SKG | |
:dep: ATH |
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_relative '../../../models/partner' | |
require_relative 'global_set' | |
describe Partner do | |
it_should_behave_like "global set" do | |
let(:key) { 'partners' } | |
end | |
before do | |
Redis::List.stub(:new => stub(:unshift => nil)) |
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 WebRequest | |
attr_reader :time, :ip, :referer, :user_agent | |
def initialize(time, ip, referer, user_agent) | |
@time = time | |
@ip = ip | |
@referer = referer | |
@user_agent = user_agent | |
@mobile = is_mobile? | |
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
" General ******************************************************************** | |
set nocompatible | |
set encoding=utf-8 | |
set fileencodings=utf-8,latin2 | |
" Autowrite current buffer on switch | |
set autowrite | |
" Tabs ************************************************************************ | |
set softtabstop=2 |
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/env ruby | |
#encoding: utf-8 | |
require "digest/md5" | |
require "open-uri" | |
require "pp" | |
class Rapi | |
def initialize avi_file_path | |
@avi_file_path = avi_file_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
module API | |
class ParallelSearch | |
API_FETCHING_TIMEOUT = 1 # seconds | |
def initialize(config, search_apis) | |
@config = config | |
@search_apis = search_apis | |
end | |
# Returns results hash of {#ExternalSearchApi => [item, ...], ...}. |
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
module Cache | |
class Entry | |
include Mongoid::Document | |
field :key, type: String | |
field :_id, type: String, default: -> { key } | |
field :value | |
field :created_at, type: DateTime | |
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
describe Array do | |
describe '#pmap' do | |
context "without timeout" do | |
it "should not raise error" do | |
expect { | |
[].pmap{|x| x} | |
}.not_to raise_error | |
end | |
it "should return proper values" do |
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
[user] | |
name = Imie Nazwisko | |
email = [email protected] | |
[alias] | |
br = branch | |
co = checkout | |
ci = commit | |
df = diff | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
OlderNewer