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 = Oskar Szrajer | |
email = oskarszrajer@gmail.com | |
[core] | |
editor = vim | |
excludesfile = ~/.gitignore | |
pager = diff-so-fancy | less --tabs=4 -RFX | |
[alias] | |
br = branch | |
co = checkout |
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 | |
require 'bundler/inline' | |
DB_URL = "postgres://localhost/gotar" | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'pg' |
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 | |
require 'bundler/inline' | |
DB_URL = "postgres://localhost/gotar" | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'rom', '~> 5.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
set nocp | |
set encoding=utf-8 | |
call plug#begin('~/.vim/plugged') | |
let g:plug_url_format = 'git@github.com:%s.git' | |
Plug 'kien/ctrlp.vim' | |
Plug 'rking/ag.vim' | |
Plug 'tpope/vim-bundler' |
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
set nocp | |
set encoding=utf-8 | |
call plug#begin('~/.vim/plugged') | |
Plug 'kien/ctrlp.vim' | |
Plug 'rking/ag.vim' | |
Plug 'tpope/vim-bundler' | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-endwise' |
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
namespace :db do | |
require 'sequel' | |
Sequel.extension(:migration) | |
MIGRATIONS_PATH = 'db/migrations' | |
def db_conn_env | |
ENV["BOOKSHELF_DATABASE_URL"] | |
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
chat: { | |
id: 1, | |
owner_id: 1, | |
member_id: 2 | |
} | |
user1: { | |
id: 1 | |
name: 'Foo' | |
} |
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 'rom-mapper' | |
class MyMapper1 < ROM::Mapper | |
reject_keys true | |
attribute :foo, from: [:bar, :baz] do |bar, baz| | |
[bar, baz] | |
end | |
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
require 'anima' | |
require 'rom-mapper' | |
require 'yaks' | |
class User | |
include Anima.new(:id, :first_name, :last_name, :posts) | |
end | |
class Post | |
include Anima.new(:id, :title) |
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 'transproc/all' | |
require 'addressable/uri' | |
## | |
# Convert string keys to symbols | |
# | |
transform = Transproc(:symbolize_keys) | |
data = { | |
'name' => 'Mark Rickerby', |
NewerOlder