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
| type serializedAccountBalance struct { | |
| AccountId string `json:"accountId"` | |
| BalanceInCents int64 `json:"balanceInCents"` | |
| BalanceCurrency string `json:"balanceCurrency"` | |
| LastDay time.Time `json:"lastDay"` | |
| } | |
| func serializeAccountBalance(accountBalance AccountBalance) (serializedAccountBalance) { | |
| serialized := serializedAccountBalance{} | |
| serialized.AccountId = accountBalance.AccountId |
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
| auth-plain () { printf $1\0\0$2 | base64 | tr -d '\n' | sed 's/^/AUTH PLAIN /' } |
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 'https://rubygems.org' | |
| gem 'rails', '3.2.12' | |
| gem 'sqlite3' | |
| group :assets do | |
| gem 'sass-rails', '~> 3.2.3' | |
| gem 'coffee-rails', '~> 3.2.1' |
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
| OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011 | |
| debug1: Reading configuration data /home/yashke/.ssh/config | |
| debug1: Applying options for ci-market | |
| debug1: Reading configuration data /etc/ssh/ssh_config | |
| debug1: Applying options for * | |
| debug2: ssh_connect: needpriv 0 | |
| debug1: Connecting to ci-market.arkency.com [176.9.104.102] port 46083. | |
| debug1: Connection established. | |
| debug3: Incorrect RSA1 identifier | |
| debug3: Could not load "/home/yashke/.ssh/id_rsa" as a RSA1 public key |
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 'rubygems' | |
| require 'google_spreadsheet' | |
| session = GoogleSpreadsheet.login("jangtugowski@gmail.com", "kakadada") | |
| spreadsheet = session.spreadsheet_by_key("0AlG-njvmBdlJdENlMzlVR3hTYUo1ZGhnck1NSm0yT3c") | |
| ws = spreadsheet.worksheets[0] | |
| ws[1, 1] = "Cześć" | |
| ws[1, 2] = "Czołgiem" | |
| ws.save |
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
| describe "SomeUsecase", -> | |
| describe "#execute", -> | |
| beforeEach -> | |
| spyOn(@usecase, 'doSmthWith').andFakeCall(=> null) | |
| it "should pass name parameter as second to callback", -> | |
| @usecase.execute("name") | |
| args = @usecase.doSmthWith.mostRecentCall.args | |
| expect(args[1]).toBe("name") |
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 ServerSideStub | |
| createToken: (callback) => | |
| callback("token") | |
| describe "SomeUsecase", -> | |
| beforeEach -> | |
| @serverSide = new ServerSideStub() | |
| @usecase = new SomeUsecase(@serverSide) | |
| describe "#execute", -> |
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 ServerSide | |
| createToken: (callback) => | |
| # asynchronously get token from server and do: | |
| callback(token) | |
| class SomeUsecase | |
| constructor: (@serverSide) -> | |
| execute: (name) => | |
| @serverSide.createToken((token) => @doSmthWith(token, name)) |
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
| 36 200 2 | |
| 37 1150 2 | |
| 37 7800 3 | |
| 37 1500 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
| data = ServerResponses.initialData | |
| data = merge(data, | |
| player: | |
| points: 10 | |
| awarded_prize: | |
| prize: | |
| name: "Better prize" | |
| ) |
NewerOlder