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 Item: | |
def __init__(self, width, height, quantity): | |
self.width = width | |
self.height = height | |
self.quantity = quantity | |
class MaterialSheet: | |
def __init__(self, width, height): | |
self.width = width | |
self.height = height |
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 nocompatible " be iMproved, required | |
filetype off " required | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'danilo-augusto/vim-afterglow' | |
Plug 'thoughtbot/vim-rspec' | |
Plug 'tomasr/molokai' | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-dispatch' |
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 nocompatible " be iMproved, required | |
filetype off " required | |
call plug#begin('~/.vim/plugged') | |
Plug 'MaxMEllon/vim-jsx-pretty' | |
Plug 'danilo-augusto/vim-afterglow' | |
Plug 'dense-analysis/ale' | |
Plug 'jparise/vim-graphql' | |
Plug 'junegunn/fzf', { 'do': './install --bin' } | |
Plug 'junegunn/fzf.vim' |
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
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git\|tmp\|coverage' |
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 nocompatible " be iMproved, required | |
filetype off " required | |
"--- Vundle | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
map <Leader>t :call RunCurrentSpecFile()<CR> |
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 MemberUniquelizer | |
refine Array do | |
# makes each member within an array | |
# unique by appending a unique number | |
def uniquelize(ary = self) | |
ary.map { |member| format_member(member) } | |
.flatten | |
.uniq |
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
### Node Class | |
using MemberUniquelizer | |
class Node < HashWithIndifferentAccess | |
attr_reader :id | |
# constructs a new hash based on injected | |
# headers and attributes | |
def self.from_rows(headers, attributes) | |
headers = uniqualize_headers(headers) |
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
# Assuming you champioin your other DB connection with a class. | |
module OtherDb | |
class Connection < ActiveRecord::Base | |
establish_connection :other_db | |
self.abstract_class = true | |
end | |
end | |
# Alway use the connection for other/legacy connections. |
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 -g default-terminal "screen-256color" | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-copycat' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
# Use vim keybindings in copy mode | |
setw -g mode-keys vi | |
bind [ copy-mode |
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
XTerm*faceName: Bitstream Vera Serif Mono | |
xterm*faceSize: 13 | |
xterm*vt100*geometry: 80x60 | |
xterm*saveLines: 16384 | |
xterm*VT100.Translations: #override \ | |
Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\ | |
Ctrl Shift <Key>C: copy-selection(CLIPBOARD) | |
# update Xterm config: |
NewerOlder