As configured in my dotfiles.
start new:
tmux
start new with session name:
This is gist. | |
There are many like it, but this one is mine. | |
It is my life. | |
I must master it as I must master my life. | |
Without me gist is useless. | |
Without gist, I am useless. |
module BootstrapPaginationHelper | |
class LinkRenderer < WillPaginate::ActionView::LinkRenderer | |
protected | |
def page_number(page) | |
unless page == current_page | |
link(page, page, :rel => rel_value(page)) | |
else | |
link(page, "#", :class => 'active') | |
end |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env bash | |
uninstall() { | |
list=`gem list --no-versions` | |
for gem in $list; do | |
gem uninstall $gem -aIx | |
done | |
gem list | |
gem install bundler | |
} |
Faux-3d SVG globe using d3.geo.orthographic and a few radial gradients. Labels offset or hidden based on radians from current map center to enhance the effect.
Uncomment svg.append("g").attr("class","countries") for hover-able country outlines.
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
# Put this method in your helper file to render inline SVG | |
def inline_svg(path) | |
file = File.open("app/assets/images/#{path}", "rb") | |
raw file.read | |
end |
# Kickoff - the quickest way to start new rails apps | |
# How it works: | |
# 1. Install the gem: `$ gem install kickoff-rails` | |
# 2. Generate your kickoff file `$ kickoff new` | |
# 3. Edit the kickoff file to specify the foundation of your app | |
# 4. Generate your app: `$ kickoff` | |
# Set up default gems | |
gems = ['omniauth', 'omniauth-twitter', 'pg', 'airbrake'] |
/* This variable is for demonstration only, but the naming convention is a shorthand for: | |
** $globalVar-spacingVar-baseline | |
*/ | |
$g-s-baseline: 23px; | |
/* You could imagine different variables following the same pattern, for example: | |
** $g-c-blue (global, color, blue) | |
** $l-f-sans (local/themed, font, sans-serif) | |
*/ |