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
" Reload Google Chrome on Mac from Vim. | |
" Adapted from: https://github.com/gcollazo/BrowserRefresh-Sublime/ | |
function! ChromeReload() | |
python << EOF | |
from subprocess import call | |
browser = """ | |
tell application "Google Chrome" to tell the active tab of its first window | |
reload | |
end tell | |
""" |
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
" Reload Google Chrome on Mac from Vim. | |
" Adapted from: https://github.com/gcollazo/BrowserRefresh-Sublime/ | |
function! ChromeReload() | |
python << EOF | |
from subprocess import call | |
browser = """ | |
tell application "Google Chrome" to tell the active tab of its first window | |
reload | |
end tell | |
""" |
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
" Reload Google Chrome on Mac from Vim. | |
" Adapted from: https://github.com/gcollazo/BrowserRefresh-Sublime/ | |
function! ChromeReload() | |
python << EOF | |
from subprocess import call | |
browser = """ | |
tell application "Google Chrome" to tell the active tab of its first window | |
reload | |
end tell | |
""" |
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
" TABS | |
" ---- | |
function! MoveCurrentTab(value) | |
if a:value == 0 | |
return | |
endif | |
let move = a:value - 1 | |
let move_to = tabpagenr() + move | |
if move_to < 0 | |
let move_to = 0 |
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
Check out http://rubyonrails.org and there is a big list of resources. Some of my favorites are: | |
http://railscasts.com/ | |
http://ruby5.envylabs.com/ | |
http://guides.rubyonrails.org/ | |
http://www.rubyinside.com/ | |
If you want to actually get into the dev, follow this - http://ruby.railstutorial.org/ | |
More advanced stuff (TDD / design patterns / refactoring strategies / etc) can be found here: http://destroyallsoftware.com |
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
$ -> | |
$('#entry_description').simplyCountable() | |
$(document).on "mouseover", "*[data-zc-copy-value]", -> | |
that = $(this) | |
width = that.outerWidth() | |
height = that.outerHeight() | |
if that.data("zc-activated") isnt "true" | |
# init new ZeroClipboard client |
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
:javascript | |
analytics.identify(#{current_user.id}, { | |
email: '#{current_user.email}', | |
name: '#{current_user.display_name}', | |
company: '#{current_user.company.try(:name)}', | |
created: '#{current_user.created_at}', | |
roles: '#{current_user.roles.map(&:name).join(',')}', | |
accredited_investor: '#{current_user.accredited_investor?}', | |
pending_accreditation: '#{current_user.pending_accreditation?}', | |
accepted_terms: '#{current_user.accepted_terms?}', |
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
# config/initializers/pdfkit.rb | |
PDFKit.configure do |config| | |
if Rails.env.development? | |
config.wkhtmltopdf = '/usr/local/bin/wkhtmltopdf' | |
config.root_url = "http://bolstr.dev" # Use only if your external hostname is unavailable on the server. | |
elsif Rails.env.test? | |
config.root_url = "http://bolstr.dev" | |
if ENV['CI'] == "true" | |
config.wkhtmltopdf = '/home/ubuntu/bin/wkhtmltopdf' |
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
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. | |
# It is recommended to regenerate this file in the future when you upgrade to a | |
# newer version of cucumber-rails. Consider adding your own code to a new file | |
# instead of editing this one. Cucumber will automatically load all features/**/*.rb | |
# files. | |
require 'simplecov' | |
SimpleCov.start 'rails' | |
SimpleCov.coverage_dir 'coverage/cucumber' | |
require 'cucumber/rails' |
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
tell application "Finder" to eject (every disk whose ejectable is true and local volume is true and physical size < 1.0E+9) |