I hereby claim:
- I am rpearce on github.
- I am rpearce (https://keybase.io/rpearce) on keybase.
- I have a public key whose fingerprint is 6F5D 52E9 DEF3 D210 66AE 97F4 E8DD 20E4 8EFB 46B5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
body { | |
transform: translateZ(0); | |
} |
# ~/.bash_profile | |
export PATH=/Users/rpearce/bin:$PATH | |
export PATH="/usr/local/sbin:$PATH" | |
eval "$(rbenv init -)" | |
eval "$(hub alias -s)" | |
alias brewup="brew update && brew upgrade && brew cleanup" |
#!/bin/sh | |
############################################################################### | |
# XCode | |
############################################################################### | |
echo "Setting up XCode..." | |
xcodebuild -license | |
xcode-select --install | |
sudo xcode-select -switch /Library/Developer/CommandLineTools |
<div class="wrapper"> | |
<div class="box"></div> | |
<div class="box content">Some text</div> | |
</div> |
$(window).on('load', function(e) { | |
if (window.location.hash == '#_=_') { | |
window.location.hash = ''; // for older browsers, leaves a # behind | |
history.replaceState('', document.title, window.location.pathname); // nice and clean | |
e.preventDefault(); // no page reload | |
} | |
}); |
// PostsController... | |
def show | |
@post = Post.find params[:id] | |
if params[:id] != @post.to_param | |
headers["Status"] = "301 Moved Permanently" | |
redirect_to post_url(@post) | |
end | |
end |
// Post model | |
def to_param | |
sluggify("#{id}-#{location_from}-to-#{location_to}") | |
end | |
def sluggify str | |
slug = str.downcase.gsub(/[^0-9a-z_ -]/i, '') | |
slug = slug.gsub(/\s+/, '-').squeeze('-') |
var user = new User(); | |
var view = new UserShow({ model: user }); | |
view.render(); | |
$('body').append(view.el); |
var UserShow = Backbone.View.extend({ | |
initialize: function() { | |
_.bindAll(this, 'render'); | |
}, | |
render: function() { | |
$('#name').html(this.model.get('fullName')) | |
this.fetchTrustCloudInfo(); | |
}, |