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" | |
class TestMine < Minitest::Test | |
def test_1 | |
field = '*' | |
expected_result = '*' | |
assert_equal expected_result, minesweeper(1, 1, field) | |
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
def test_calls_remote_service | |
remote_services = Minitest::Mock.new | |
voice_service = VoiceService.new(remote_services) | |
remote_services.expect :request_recognize, { result: 'ochenta y ocho' }.to_json, ['88.wav'] | |
result = voice_service.recognize('88.wav') | |
assert_equal 'ochenta y ocho', result | |
remote_services.verify | |
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
it 'calls remote service' do | |
expect(RemoteServices).to receive(:request_recognize) | |
.with('88.wav') | |
.and_return({result: 'ochenta y ocho'}.to_json) | |
result = VoiceService.recognize('88.wav') | |
expect(result).to eql('ochenta y ocho') | |
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
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix |
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
(def dd (fn [l] (fn[n] (drop n l)))) | |
(def tails (fn [l] (map (dd l) (range 0 (count l))))) |
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
[alias] | |
pr = "!f() { git log --merges --ancestry-path --oneline $1..master | grep 'pull request' | tail -n1 | awk '{ print $5 }'; }; f" |
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
# This configuration was generated by `rubocop --auto-gen-config` | |
# on 2014-07-03 15:34:29 +0000 using RuboCop version 0.24.1. | |
# The point is for the user to remove these configuration records | |
# one by one as the offenses are removed from the code base. | |
# Note that changes in the inspected code, or installation of new | |
# versions of RuboCop, may require this file to be generated again. | |
Style/ClassLength: | |
Enabled: false | |
Style/DotPosition: |
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
set encoding=utf-8 | |
set nocompatible " Must come first because it changes other options. | |
syntax enable " Turn on syntax highlighting. | |
set tabstop=2 " Global tab width. | |
set shiftwidth=2 " And again, related. | |
set expandtab " Use spaces instead of tabs | |
set softtabstop=2 " Makes the spaces feel like real tabs |
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
#decrypt | |
gpg -o ./Desktop/personal.tgz -d ./Dropbox/personal.tgz.gpg && cd ./Desktop/ && tar xvzf personal.tgz && rm personal.tgz && cd .. | |
#encrypt | |
cd ./Desktop/ && tar cvzf - personal/ | gpg -esr $PGP_RECIPIENT > ../Dropbox/personal.tgz.gpg |
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-add=css=.sass,.less,.scss | |
--type-add=ruby=.rake,.rsel,.builder,.thor | |
--type-add=html=.haml,.html.erb,.html.haml | |
--type-add=js=.js.erb,.coffee | |
--type-set=cucumber=.feature | |
--type-set=c=.c,.cpp,.ino,.pde,.h | |
--ignore-dir=vendor | |
--ignore-dir=log | |
--ignore-dir=tmp | |
--ignore-dir=doc |
NewerOlder