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 Users::SessionsController < Devise::SessionsController | |
# Have to reimplement :recall => "failure" | |
# for warden to redirect to some action that will return what I want | |
def create | |
resource = warden.authenticate!(:scope => resource_name, :recall => "failure") | |
# set_flash_message :notice, :signed_in | |
sign_in_and_redirect(resource_name, resource) | |
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
# Remap prefix | |
set -g prefix C-a | |
unbind C-b | |
# We’ve remapped Ctrl-a as our Prefix, but programs such as Vim, Emacs, | |
# and even the regular Bash shell also use that combination. | |
# We need to configure tmux to let us send that command through when we need it | |
bind C-a send-prefix | |
# tmux adds a very small delay when sending commands, |
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' to ward off unexpected things that your distro might | |
" have made, as well as sanely reset options when re-sourcing .vimrc | |
set nocompatible | |
filetype off " required | |
scriptencoding utf-8 | |
set encoding=utf-8 | |
" Clear mapping | |
mapclear |
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
#!/bin/sh | |
# Borrowed from http://marcparadise.com/blog/2013/09/21/how-to-fix-a-corrupt-history-file/ | |
# If you ever see a message like this upon starting a new shell | |
# zsh: corrupt history file /home/marc/.zsh_history | |
# here is a quick fix | |
cd ~ | |
mv .zsh_history .zsh_history_bad | |
strings .zsh_history_bad > .zsh_history | |
# And reload history | |
fc -R .zsh_history |
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
./configure --with-features=huge --enable-luainterp=yes --enable-perlinterp=yes --enable-pythoninterp=yes --enable-python3interp=yes --enable-rubyinterp=yes --enable-multibyte |
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
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space |
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
#cloud-config | |
# include one or more SSH public keys | |
ssh_authorized_keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCvXuhhBvI4FxrBDnmp6ziwkWmAQeHXFOXeUPY1F9Vmy9tw9Xvba1S581Mj2VVWALPMtFiaoukN/Ceo8r42OVwZOy4prsqsrNGnLtCs9EMMIzzlbgXTHinDZcD8w2WCoisNcOSznla6r2BxBOhk1vX4/+iureXzdYnlyrnEJwEWl0sE0Z2Cej/xWd36WgwX0JDvl37W8Vhq8hEIkJjOOQ60EbK7UVtMYnAYwM+NNnI2Tfsw7Z5/4J4opf6vt0PqlICnm50T0p7NDBOB6TRzWzWoJozidfR8fHBou90PhwFl9OFmFmmnG7qnvAlAf+sTJMo4BrAn7B37fT+OE9imBnx32LqfxJbXxwhMRypoy91oEyYO7DFzs7J+JS4PbM0o+fJDhF57K4Ooa+YksNJVDKu+bSuKF/1H1uU/GEI0t7ApWASSalJ5bcDeNhZeGjyB8KWKUPLlypnxFfuoeHC7yBY9Ru++nUsx/OQreNuUaaMpDsRhtvHA3D9G5HDlUXA6HRxRoRRAoZA6dHoc89B2iFZ0D9Erjx/w4ztudBaa519GlutJm3km4uP9JL2GGAoJplnRDqv6V4ljZPpdW1bZWZ710yXGiBl6HbuKrFQ+8MuxVAyPDP/oX+nkm32t4LLwSYWtWynpzxefpTFyRxq1pNY5U7rXz3t8rfFx8j/C/hAyYQ== [email protected] | |
coreos: | |
etcd2: | |
# Static cluster | |
name: etcdserver | |
initial-cluster-token: etcd-cluster-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
" Directory for plugins | |
" - Avoid using standard Vim directory names like 'plugin' | |
call plug#begin('~/.local/share/nvim/plugged') | |
Plug 'tpope/vim-unimpaired' | |
" Plug 'tpope/vim-scriptease', {'type': 'opt'} | |
Plug 'tpope/vim-markdown' " installed for a single purpose of having syntax highlighting inside fenced blocks | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-repeat' |
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 true color | |
set-option -sa terminal-overrides ",xterm*:Tc" | |
set -g mouse on | |
# Set prefix | |
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
# Shift Alt vim keys to switch windows |