Skip to content

Instantly share code, notes, and snippets.

Brian Smith Lytol

Block or report user

Report or block Lytol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lytol.zsh-theme
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●%f'
zstyle ':vcs_info:*' unstagedstr '%F{red}●%f'
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' formats '[%F{027}%b%f%c%u] '
zstyle ':vcs_info:*' enable git
theme_precmd () {
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
zstyle ':vcs_info:*' formats '[%F{027}%b%f%c%u] '
View rails-application-template.rb
# Replace the Gemfile wholesale, it's just easier
#
remove_file "Gemfile"
create_file "Gemfile", <<-EOF
source 'https://rubygems.org'
ruby '2.1.5'
gem 'rails', '4.2.0'
gem 'pg'
View dev
#!/bin/bash
SESSION=`basename $PWD`
tmux new-session -d -s $SESSION -n 'Shell'
tmux split-window -h
if [[ -e Procfile ]]; then
tmux new-window -t $SESSION:1 -n 'Foreman'
@Lytol
Lytol / gist:5015688
Last active Dec 14, 2015
Beginner's Guide to Vim
View gist:5015688
@Lytol
Lytol / gist:1065962
Created Jul 5, 2011
Body tag helper that sets class and id based on controller/action
View gist:1065962
def body_tag(&blk)
controller_name = controller.class.to_s.underscore.gsub(/_controller$/, '').gsub(/\//,'_')
action_name = controller.action_name.underscore.gsub(/_/,'-')
content_tag(:body, :id => "#{controller_name}-#{action_name}", :class => controller_name, &blk)
end
@Lytol
Lytol / ultemplate.rb
Created Sep 23, 2010
Rails 3 Application Template
View ultemplate.rb
# Rails application template for Rails 3 + Postgres + Git + haml + JQuery + Rspec + Cucumber + Capybara + FactoryGirl
# by Brian Smith <bsmith@swig505.com>
# Create a default README
file "README.md", <<-EOF
#{app_name}
#{"=" * app_name.length}
TODO: description
You can’t perform that action at this time.