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
# place in RAILS_ROOT/config/initializers/ | |
# This initializer will give a simple table-based form layout using SimpleForm | |
# There are two wrappers provided. | |
# simple_form_for(@obj, wrapper: "table") will make <TR><TH>label</TH><TD>input, help, and error</TD></TR> | |
# simple_form_for(@obj, wrapper: "table_just_cells") will skip the TR tags. | |
SimpleForm.setup do |config| | |
# wrap all the common wrapper initialization in a lambda | |
# I don't think you can just do `b.use :table_just_cells` inside :table, or I would have. this works well enough. |
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
cpm@juno ~/tmp: cat <<EOF | perl -P | |
#define MACRO sub { say "Something Interesting" } | |
use feature "say"; | |
MACRO->(); | |
EOF | |
Something Interesting |
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
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.histfile | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
setopt appendhistory autocd beep extendedglob nomatch notify | |
bindkey -e | |
# End of lines configured by zsh-newuser-install | |
# The following lines were added by compinstall | |
zstyle :compinstall filename '/home/cpm/.zshrc' |
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
" My usual .vimrc. Tired of losing this. | |
set softtabstop=2 | |
set shiftwidth=2 | |
set tabstop=2 | |
set expandtab | |
set bg=dark | |
filetype plugin on | |
filetype indent on |
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
# I am tired of losing this. | |
# Pretty PS1, and shows git branch. | |
export PS1="\[\033[0;38m\][ \[\033[0;37m\]\u\[\033[0;31m\] \h \[\033[0;33m\]\w\[\033[0;32m\]\$(__git_ps1 ":%s")\[\033[0;38m\] ] \[\033[0m\]" |