Skip to content

Instantly share code, notes, and snippets.

@curiouslychase
curiouslychase / _resets.sass
Last active December 15, 2015 02:09
Eric Meyers' CSS Reset v2.0 & Chris Coyier's group clearfix & Paul Irishes box layout model SASSified
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
* http://cssreset.com
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
u, center,
/* apply a natural box layout model to all elements */
*
-moz-box-sizing: border-box
-webkit-box-sizing: border-box
box-sizing: border-box
@curiouslychase
curiouslychase / chase.bashrc
Created March 20, 2013 22:40
General bashrc sourced from my bash_profile
#!/bin/bash
# This is my general bashrc that I source into bash_profile.
# Why you ask? Good question: Because I have more than one computer that
# I use terminal and vim on and the bash_profiles on both of them have totally
# different aliases for directory hotswitching and other commands.
# For some reason this is required for the PS1 to work with __git_ps1
PATH="/usr/local/bin:${PATH}"
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
#Because it's more fun this way.
alias rtfm="man"
@curiouslychase
curiouslychase / jekyll_highlight_mod.rb
Last active December 20, 2015 07:29
A script to modify Jekyll's highlight class. Updated for Jekyll 1.0.3 from this blog post: http://thanpol.as/jekyll/jekyll-code-highlight-and-line-numbers-problem-solved/
# Working as of Jekyll 1.0.3
module Jekyll
class WrapHighlightBlock < Jekyll::Tags::HighlightBlock
def initialize(tag_name, markup, tokens)
super
end
def render(context)
'<figure class="code"><figcaption></figcaption>' + super + '</figure>'
@curiouslychase
curiouslychase / jekyllmeta.sublime-snippet
Created August 13, 2013 13:40
Quick Jekyll Meta Sublime Snippet. USE: in sublime, type jm, hit tab and your snippet is inserted.
<snippet>
<content><![CDATA[
---
layout: post
title: "${1:Post Title}"
date: "${2:Date}"
tags: [${3:Tags}]
excerpt: "${4:The Excerpt}"
---
]]></content>
var pattern = /(?:chaseadams\..{2,4}|gmail.com|zappos.com|myfooyourbar\.(?:com|net))$/g
@curiouslychase
curiouslychase / commit-msg
Created August 13, 2013 20:35 — forked from anonymous/commit-msg
Place this in the following path relative to your git repo's root: .git/hooks/commit-msg
#!/usr/bin/env ruby
# Hook into the message and append the branch name so that we don't have to
# manually do it ourselves!
# This is the message that you put when you do:
# `git commit -m "This is my message"
message_file = ARGV[0]
message = File.read(message_file).strip
branch_name = `git rev-parse --abbrev-ref HEAD`.strip
@curiouslychase
curiouslychase / .editorconfig
Created August 13, 2013 21:28
Editor config for http://editorconfig.org/ for my team.
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
charset = "utf-8"
trim_trailing_whitespace = true
@curiouslychase
curiouslychase / git_diff_file.diff
Last active December 21, 2015 02:09
Requirements: - Must have an exports jira='http://my.jira.url' - must be on a branch that's not master
# $1 : remote name you want to diff against
function gdf () {
# get the current branch reference, cut with the delimiter /
# and grab the 3rd item in the list, copy to the pastebord, use the pbpaste
# as the diff name.
current_branch=`git symbolic-ref HEAD | cut -d"/" -f 3`;
git diff $1/master...HEAD --relative > ~/difflog/$current_branch.diff;
open "$jira/$current_branch";
}