This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
gem 'pg' | |
group :development do | |
gem 'ruby-debug' | |
end | |
gem 'rake', '~> 0.8.7' | |
gem 'devise' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
gem 'omniauth' | |
gem 'haml' | |
gem 'dynamic_form' |
class String | |
def camel_case | |
parts = self.split | |
parts.each { |p| p.capitalize! } | |
parts[0].downcase! | |
parts.join | |
end | |
def camel_case! | |
parts = self.split |
[ | |
{ "keys": ["ctrl+shift+."], "command": "erb" }, | |
{ "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" }, | |
# jump to beginning of line | |
{ "keys": ["alt+9"], "command": "move_to", "args": {"to": "bol", "extend": false}}, | |
# jump to end of line | |
{ "keys": ["alt+0"], "command": "move_to", "args": {"to": "eol", "extend": false}}, | |
{ "keys": ["alt+u"], "command": "insert", "args": {"characters": "_"} }, | |
{ "keys": ["alt+="], "command": "insert", "args": {"characters": "=>"} }, |
class Shape | |
attr_accessor :color | |
def initialize(color="red") | |
@color = color | |
end | |
end | |
class Circle < Shape | |
%h4= @wikiview.wiki_title | |
%p= @wikiview.wiki_content | |
%h5 Add collabos | |
= form_for(@wikiview.wiki) do | |
%table | |
%tr | |
%th Email | |
%th Add collabo |
# git | |
alias gmv='git remote -v' | |
alias m='git add .;git commit -m' # ex: "m New Feature" | |
alias ga='git add .' | |
alias gl='git pull' | |
alias gp='git push' | |
alias gd='git diff' | |
alias gdd='git diff HEAD HEAD^1' | |
alias gco='git checkout' | |
alias gb='git branch' |
def add_item (item, list) | |
# nb: no need to return list explicitly; the << operator - which | |
# is a method in the Array class - returns the Array itself. | |
list << item unless list.include?(item) | |
# list | |
# also, no need for this else statement | |
# else | |
#list | |
#end |
<!-- app/views/devise/registrations/edit.html.erb --> | |
<h2>Edit <%= resource_name.to_s.humanize %></h2> | |
<div class="row"> | |
<div class="col-md-8"> | |
<h3>Change email or password</h3> | |
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :patch }) do |f| %> | |
<%= devise_error_messages! %> | |
<div class="form-group"> |
class AddHstoreExtension < ActiveRecord::Migration | |
def up | |
execute 'CREATE EXTENSION hstore' | |
end | |
def down | |
execute 'DROP EXTENSION hstore' | |
end | |
end |