Skip to content

Instantly share code, notes, and snippets.

@jbonney
jbonney / Preferences.sublime-settings
Last active October 12, 2015 05:38
Sublime 2 - Preferences User Settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Base16 Color Schemes/base16-default.dark.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
@jbonney
jbonney / .gitconfig
Created November 12, 2012 17:36
Git configuration file
[user]
name = Your Name
email = ...@email.com
[alias]
ls = ls-files
co = checkout
ci = commit
br = branch
df = diff
dc = diff --cached
@jbonney
jbonney / concerns.rb
Created May 8, 2013 10:47 — forked from dhh/gist:1014971
ActiveSupport::Concern sample template. Additional documentation available on Rails page: http://api.rubyonrails.org/classes/ActiveSupport/Concern.html
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end
@jbonney
jbonney / Gemfile
Created May 9, 2013 11:47
Combine Parsley.js and Twitter Bootstrap
source 'https://rubygems.org'
gem "twitter-bootstrap-rails", ">= 2.2.6", :group => :assets
gem "parsley-rails", "~> 1.1.16.0", :group => :assets
@jbonney
jbonney / I18n.sublime-snippet
Created May 23, 2013 10:16
Code snippet for sublime text: I18n in Rails
<snippet>
<content><![CDATA[
I18n.t('${1:dictionary.key}')
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>18</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.ruby, source.html, source.js</scope>
</snippet>
@jbonney
jbonney / logi.sublime-snippet
Created May 23, 2013 17:27
Code snippet for sublime text: Rails.logger.info
<snippet>
<content><![CDATA[
Rails.logger.info "${1:text}"
]]></content>
<description>Rails logger info (text)</description>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>logi</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.ruby</scope>
</snippet>
@jbonney
jbonney / logv.sublime-snippet
Created May 23, 2013 17:31
Code snippet for sublime text: Rails.logger.info with variable inspect
<snippet>
<content><![CDATA[
Rails.logger.info "${1:text} #{${2:variable}.inspect}"
]]></content>
<description>Rails logger info (variable)</description>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>logv</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.ruby</scope>
</snippet>
@jbonney
jbonney / if_html_rails.sublime-snippet
Created May 30, 2013 12:35
Code snippet for sublime text: ERB if statement
<snippet>
<content><![CDATA[
<% if ${1:condition} -%>
${2:html}
<% end -%>
]]></content>
<description>if autocompletion with ERB</description>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>if</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@jbonney
jbonney / ife_html_rails.sublime-snippet
Created May 30, 2013 12:39
Code snippet for sublime text: ERB if-else statement
<snippet>
<content><![CDATA[
<% if ${1:condition} -%>
${2:html}
<% else -%>
${3:html}
<% end -%>
]]></content>
<description>if-else autocompletion in ERB</description>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
@jbonney
jbonney / xfce packages
Created June 8, 2013 21:20
Packages installed during xubuntu installation. Ubuntu installs a customized version of xfce: sudo apt-get install xubuntu-desktop
abiword abiword-common abiword-plugin-grammar
abiword-plugin-mathview blueman brltty-x11 catfish flex
fonts-droid gigolo gimp gimp-data gmusicbrowser
gnome-desktop-data gnome-time-admin gnumeric gnumeric-common
gnumeric-doc gstreamer0.10-gnomevfs gthumb gthumb-data
indicator-application-gtk2 indicator-messages-gtk2
indicator-sound-gtk2 indicator-status-provider-pidgin leafpad
libabiword-2.9 libbabl-0.0-0 libcolamd2.7.1 libdigest-crc-perl
libfl-dev libgdome2-0 libgdome2-cpp-smart0c2a libgegl-0.0-0
libgimp2.0 libgoffice-0.8-8 libgoffice-0.8-8-common libgsf-1-114