Skip to content

Instantly share code, notes, and snippets.

View ethanmuller's full-sized avatar

Ethan Muller ethanmuller

View GitHub Profile
@ethanmuller
ethanmuller / Vimnastics Fig. 1
Created September 21, 2012 16:45
Vimnastics: Writing Repetitive Markup in Vim
<select>
<option value="100">$100</option>
<option value="200">$200</option>
<option value="300">$300</option>
<!-- and so on... -->
</select>
@ethanmuller
ethanmuller / Readme
Created November 8, 2012 16:03
HD Sprite Mixin
This mixin requires three arguments: the standard definition sprite map, the hd sprite map, and the icon you want to use.
Optionally, you can give it X and Y offsets to position it, a width to resize it, or you can center it on the X axis, Y axis, or both.
Use it something like this:
// Create sprite maps
// (Just do this once per sprite sheet)
$general-sd: sprite-map("icons/general/*.png", $spacing: 30px);
$general-hd: sprite-map("hd/icons/general/*.png", $spacing: 60px);
@ethanmuller
ethanmuller / Readme
Created November 8, 2012 16:03
HD Sprite Mixin
This mixin requires three arguments: the standard definition sprite map, the hd sprite map, and the icon you want to use.
Optionally, you can give it X and Y offsets to position it, a width to resize it, or you can center it on the X axis, Y axis, or both.
Use it something like this:
// Create sprite maps
// (Just do this once per sprite sheet)
$general-sd: sprite-map("icons/general/*.png", $spacing: 30px);
$general-hd: sprite-map("hd/icons/general/*.png", $spacing: 60px);
@ethanmuller
ethanmuller / init.sh
Last active December 11, 2015 22:59 — forked from asimpson/init.sh
function sb_init {
local RED="\033[0;31m"
local NC="\033[0m"
if [ ! $# == 1 ]; then
echo -e "${RED}Please specify a project name.${NC}"
echo -e "Usage: init project-name\n"
else
if ! type "ruby" > /dev/null; then
echo -e "${RED}Please install Ruby:${NC}"
#!/bin/bash
PROFILE=~/.bashrc
curl -sSL https://gist.github.com/raw/4673740/init.sh >> "$PROFILE"
echo "Sparkbox init function appended to $PROFILE"
echo 'Run "sb_init [project-name]" to get started!'
exec bash
@ethanmuller
ethanmuller / example-1.scss
Last active December 25, 2015 16:29
A post on how to name media queries, why you'd want to, and the reasoning behind it.
$bp-header-split: 32em;
header {
h1 {
@media (min-width: $bp-header-split){
float: left;
}
}
h2 {
@media (min-width: $bp-header-split){
@ethanmuller
ethanmuller / 0_reuse_code.js
Created November 6, 2013 18:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/* BOGUS */
input:checked {
/* Adds a 5px border to bottom of this element */
border-bottom: 5px solid green;
}
/* BEAUTIFUL */
input:checked {
/* Adds "selected" indicator to this element */
border-bottom: 5px solid green;

Keybase proof

I hereby claim:

  • I am ethanmuller on github.
  • I am ethanmuller (https://keybase.io/ethanmuller) on keybase.
  • I have a public key ASAjZGtOwScXwcXL6-1xgKbJo_5_7W7qUiF01yQcJ6ptbwo

To claim this, I am signing this object: