Skip to content

Instantly share code, notes, and snippets.

View rpearce's full-sized avatar

Robert Pearce rpearce

View GitHub Profile
@rpearce
rpearce / install-script--personal.sh
Last active July 25, 2023 16:04
New Mac Install Script (Personal)
#!/bin/sh
###############################################################################
# Homebrew
###############################################################################
echo "Installing command line utilities"
# Check for Homebrew,
# Install if we don't have it
@rpearce
rpearce / install-script--students.sh
Last active August 31, 2015 17:04
New Mac Install Script (Students)
#!/bin/sh
###############################################################################
# XCode
###############################################################################
echo "Setting up XCode"
xcodebuild -license
xcode-select --install
@rpearce
rpearce / .bash_profile
Last active July 26, 2016 08:39
Bash prompt & git prompt setup
# ~/.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"
@rpearce
rpearce / tooltip.css
Last active August 29, 2015 14:22
Accessible CSS3 Tooltip
[data-has-tooltip] {
position: relative;
display: inline-block;
box-sizing: border-box;
border-bottom: 0.167rem dashed #b4e7f8;
cursor: help;
}
[data-tooltip],
[data-tooltip]:after {
visibility: hidden;
@rpearce
rpearce / test.html
Last active August 29, 2015 14:22
Great tooltip that sadly isn't accessible :(
<p>
Slow-carb Tumblr High Life biodiesel, stumptown keytar art party mumblecore PBR next level chillwave McSweeney's meh butcher Bushwick.
Twee try-hard meditation viral, master cleanse butcher pour-over Pitchfork Vice <span data-tooltip="This is a wide tooltip">farm-to-table</span> paleo Portland brunch.
Ugh plaid lomo YOLO food truck, mustache migas +1 viral health goth tousled. Tofu chambray Portland chillwave chia authentic.
Typewriter hoodie freegan Intelligentsia fashion axe. <span data-tooltip="Something to say here">Listicle +1 craft beer tattooed mlkshk jean</span> shorts, Banksy ethical selfies Pitchfork Portland irony.
Tattooed four loko cardigan, ugh cold-pressed heirloom ennui meditation fap literally authentic migas.
</p>
@rpearce
rpearce / bad_code-v1.rb
Last active August 29, 2015 14:20
Some of the worst code I've ever written!
`make clean;`
`make setup;`
Dir.glob('./*.pdf') do |pdf_file|
`pdftotext #{pdf_file} -raw;`
end
require 'pry'
require 'csv'
@rpearce
rpearce / SassMeister-input.sass
Created November 12, 2014 16:07
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
@mixin dimensions($width, $height: 0)
@if $height == 0
width: $width
height: $width
@else
@rpearce
rpearce / index.html
Created August 8, 2013 16:05
A CodePen by Robert Pearce.
<div class="wrapper">
<div class="box"></div>
<div class="box content">Some text</div>
</div>
@rpearce
rpearce / facebook_oauth_fix
Created July 31, 2013 15:56
jQuery fix for annoying #_=_ returned from Facebook Oauth
$(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
}
});
@rpearce
rpearce / gist:6108224
Created July 29, 2013 21:55
Don't add transform: translateZ(0); to your body tag if you want fixed elements to work.
body {
transform: translateZ(0);
}