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
require "middleman" | |
require 'rspec' | |
require 'capybara/rspec' | |
Capybara.app = Middleman::Application.server.inst do | |
set :root, File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
set :environment, :development | |
set :show_exceptions, false | |
end |
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
require "spec_helper" | |
describe "index", :type => :feature do | |
before do | |
visit "/" | |
end | |
it "has the correct title header" do | |
page.should have_selector "h1" | |
within "h1" do |
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
But if you’re using a table for this purpose (and not to display tabular-data), instead you should use another type of element (div, for example), and set its display property to table to mimick a the table behavior. | |
<style> | |
.vertical-outer { | |
display: table; | |
height: 10em | |
} | |
.vertical-inner { |
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 "OmniFocus" | |
tell default document | |
set inbox_tasks to every inbox task | |
repeat with t in inbox_tasks | |
set t_name to (name of t) as Unicode text | |
set t_note to (note of t) as Unicode text | |
if matchResult of (find text "[w|W]atch" in t_name with regexp) exists then | |
set t_url to do shell script "/Users/brandonpittman/.rbenv/shims/ruby /Users/brandonpittman/Dropbox/Documents/Code/Ruby/get_url_title.rb " & t_note | |
set name of t to "Watch " & t_url | |
end if |
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
task :default => :update | |
desc "Update packages" | |
task :update => [:rcup, :brew, :gems] | |
namespace :brew do | |
desc "Run setup Homebrew commands..." | |
task :setup do | |
sh "brew bundle Setupfile" | |
end |
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
#!/bin/bash | |
# This script removes all annoying .DS_Store' | |
s recursively from you Mac | |
# The first argument is the starting directory | |
# from: https://coderwall.com/p/oxxwca | |
search_folder () { | |
dir="$1" | |
if [ -d "$dir" ];then |
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 "Pages" | |
set alphabet to "abcdefghijklmnopqrstuvwxyz" | |
set _table to table 1 of front document | |
set _cells to every cell of _table | |
repeat with _cell in _cells | |
if value of _cell = missing value then | |
set value of _cell to (some item of alphabet) | |
end if | |
end repeat | |
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
" autolink.vim: find and insert URLs for links in Markdown and ReST | |
function! AutoLinkDefaultBindings() | |
nnoremap <Leader>ac :call autolink#DefComplete()<CR> | |
nnoremap <Leader>am :call autolink#DefCreate()<CR> | |
nnoremap <Leader>al :call autolink#Combined()<CR> | |
nnoremap <Leader>aB :call autolink#AppendBrowserURL()<CR> | |
nnoremap <Leader>ab :call autolink#CombinedBrowser()<CR> | |
endfunction | |
augroup AutoLink |
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
Night Flight | |
Use Cases | |
Personal Item on Airline | |
Good | |
20L of space | |
allows for lots of compartmentalization | |
Bad | |
top open flap might be a hassle | |
lacks good places for travel documents | |
Overnight Bag |
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
" Titlecase a line | |
nmap <Leader>U mm:s/\v<(\w)/\U\1/g<CR><CR>`m |