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
gem 'turbolinks' | |
gem 'jquery-turbolinks' |
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
Disable vim automatic visual mode on mouse select | |
issue: :set mouse-=a | |
add to ~/.vimrc: set mouse-=a | |
my ~/.vimrc for preserving global defaults and only changing one option: | |
source $VIMRUNTIME/defaults.vim | |
set mouse-=a |
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 | |
# If you get "unknown OID 705: failed to recognize type of '<field>'. It will be treated as String." | |
# it probably means that type of column could not be identified when retriving records | |
# Example | |
User.where("'something' as something") | |
# Will results in unknown OID. However doing this: |
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
def solution(A): | |
import math | |
N = len(A) | |
fib_maxarg = int(math.sqrt(N)) + 10 | |
def fib(n): | |
""" Compute nth Fibonacci number """ | |
if not hasattr(fib, 'mem'): | |
fib.mem = [0]*fib_maxarg |