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
""""""""""""""""""""""""""""""""""""" | |
" Lorenzo Sinisi Vimrc configuration | |
""""""""""""""""""""""""""""""""""""" | |
set nocompatible | |
syntax on | |
set nowrap | |
set ignorecase | |
set smartcase | |
set encoding=utf8 | |
set mouse=nicr |
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
""""""""""""""""""""""""""""""""""""" | |
" Lorenzo Sinisi Vimrc configuration | |
""""""""""""""""""""""""""""""""""""" | |
set nocompatible | |
syntax on | |
set nowrap | |
set ignorecase | |
set smartcase | |
set encoding=utf8 | |
set mouse=nicr |
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 | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
set expandtab | |
set tabstop=2 | |
set shiftwidth=2 | |
set splitright | |
set number |
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
{ | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": true, | |
"color_scheme": "Packages/Colorsublime - Themes/Solarized-dark.tmTheme", | |
"copy_with_empty_selection": true, | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
"production", |
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
devise_for :coaches, | |
path: 'coaches', | |
path_names: { | |
sign_in: 'login', | |
sign_out: 'logout', | |
password: 'secret', | |
confirmation: 'verification', | |
unlock: 'unblock', | |
registration: 'register', | |
sign_up: 'new' |
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 RegistrationsController < Devise::RegistrationsController | |
before_action :check_captcha, only: [:create] | |
private | |
def check_captcha | |
binding.pry # it should stop here | |
unless verify_recaptcha | |
self.resource = resource_class.new sign_up_params | |
respond_with_navigational(resource) { render :new } | |
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
# source http://www.thegermanprofessor.com/top-500-german-words/ | |
# they are really 429 and not 500 but a pretty good start | |
["und", "sein", "in", "an", "zu", "at", "haben", "ich", "werden", "sie", "her", "them", | |
"von", "nicht", "mit", "es", "sich", "auch", "auf", "für", "an", "so", "dass", "können", "dies", | |
"als", "when", "ihr", "her", "theirs", "ja", "wie", "bei", "oder", "wir", "aber", "dann", "man", | |
"da", "sein", "its", "noch", "nach", "was", "also", "aus", "all", "wenn", "nur", "müssen", "sagen", | |
"um", "machen", "kein", "du", "mein", "schon", "vor", "durch", "geben", "mehr", "anderes", "viel", | |
"kommen", "jetzt", "sollen", "mir", "wollen", "ganz", "all the", "mich", "immer", "gehen", "sehr", | |
"hier", "doch", "still", "bis", "groß", "wieder", "zwei", "gut", "wissen", "neu", "sehen", "lassen", | |
"have", "uns", "weil", "unter", "denn", "stehen", "jed", "die", "erstes", "ihm", "it", "ihn", "wo", |
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 | |
autocmd ColorScheme * if g:colors_name == 'solarized' | hi link matlabComma Normal | else | hi link matlabComma SpecialKey | endif | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
set expandtab | |
set tabstop=2 | |
set shiftwidth=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
# How to find out when and where a method is called in Rspec | |
puts "CALLED :#{caller_locations(1,1)[0].label} at #{caller_locations[1]}".red |
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 'watir-webdriver' | |
def log (message) puts " #{message}" end | |
def success (message) puts "+ #{message}" end | |
def fail (message) puts "- #{message}" end | |
def notify (message) | |
success message.upcase | |
system 'osascript -e \'Display notification "Bürgerbot" with title "%s"\'' % message | |
rescue StandardError => e |