Skip to content

Instantly share code, notes, and snippets.

@henrahmagix
henrahmagix / index.css
Created November 14, 2012 11:23
Quickly apply 'read more' jump links to full content
body {
background-color: #B9B79E;
color: #2C241D;
font-family: "PT Sans", Arial;
font-size: 12px;
font-weight: normal;
}
code {
background-color: #EDEDE7;
@henrahmagix
henrahmagix / compass_diff_tamer.sh
Created November 16, 2012 17:23
Tame a git-diff output of Compass compiled CSS with line-number comments
git diff "$@" | grep '^[-+][^/]'
@henrahmagix
henrahmagix / button.css
Created December 2, 2012 18:32
Indented button with increased hit area.
.button {
background-color: #EDEDE7;
border: 1px solid #593723;
-moz-box-shadow: 0 10px 0 0 #593723, 0 10px 15px 2px rgba(0, 0, 0, 0.8);
-webkit-box-shadow: 0 10px 0 0 #593723, 0 10px 15px 2px rgba(0, 0, 0, 0.8);
box-shadow: 0 10px 0 0 #593723, 0 10px 15px 2px rgba(0, 0, 0, 0.8);
color: #593723;
display: block;
padding: 10px;
position: relative;
@henrahmagix
henrahmagix / dom-insert-counter.js
Created December 5, 2012 22:37 — forked from benfoxall/gist:4217317
DOMNodeInserted
(function($) { $(function() {
// All the nyans.
var nyan = $('.nyan');
var nyanImg = '<img width="40px" src="http://i1.kym-cdn.com/photos/images/original/000/117/424/tumblr_ljwaimhJcK1qa4ebfo1_500.gif" />';
var mouseStillDown = false;
var firstMouseDown = false;
var insertingNyan = false;
var button = $('.button');
// Make the timings editable.
@henrahmagix
henrahmagix / canvas-snow.js
Created December 8, 2012 13:43
Snow in an HTML5 Canvas
/*
Source: http://www.codeproject.com/Tips/374219/HTML5-Snow-Canvas
Licence: Ms-PL
Author: Agon Avdimetaj, @AgonAvdimetaj
This code is slightly altered from Agon Avdimetaj's code at the link above.
It is changed to use prototypes and so the only global variable pollution comes
from the window.CanvasSnow property. It is also more extensible.
I don't know the terms for this kind of Javascript, so this section is open to
@henrahmagix
henrahmagix / hide-single-items.css
Created December 19, 2012 13:48
Hide single instances of items designed to indicate that there are multiples.
#Indicator ul li:first-child:last-child {
/* Forever alone */
display: none;
}
@henrahmagix
henrahmagix / jam-reset
Created January 11, 2013 19:02
Remove all changes to Jam package files.
# Jam
alias jam-reset='jam ls | xargs jam remove && jam install'
@henrahmagix
henrahmagix / nicethings.md
Last active December 11, 2015 06:09
My presentation on nice front-endery things

Nice Things

My presentation on nice front-endery things

  • [gist.io][this gist]
  • [bl.ocks.org][my demos]
    • CSS - Indented Button
  • JS - Readless
@henrahmagix
henrahmagix / git-config-github-password
Created January 17, 2013 17:52
Securely set GitHub password in ~/.gitconfig
[github]
user = USER
password = !security find-generic-password -gs github.password -w | tr -d '\n'
@henrahmagix
henrahmagix / contact.md
Last active December 11, 2015 06:28
Find me!