Skip to content

Instantly share code, notes, and snippets.

View csswizardry's full-sized avatar

Harry Roberts csswizardry

View GitHub Profile
@JamieMason
JamieMason / watch.rb
Created September 26, 2012 08:16
Watch a folder for changes to files, then reload Chrome
#!/usr/bin/env ruby
require 'tempfile'
require 'fileutils'
# Signals
trap("SIGINT") { exit }
# Setup
TARGET_FOLDER = ARGV[0]
TARGET_URL = ARGV[1]
@pjkix
pjkix / css-stats-ack.sh
Created October 5, 2011 21:39
shell script to generate some css file statistics
#!/bin/bash
## v1.0.6
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
@noamr
noamr / script-parsing.js
Last active August 23, 2023 16:34
A polyfill for script element loading (for illustration purposes)
function parseHTML(getNextElement) {
let doneParsing = null;
const whenDoneParsing = new Promise(resolve => { doneParsing = resolve; });
while (const element = getNextElement()) {
if (element.tagName !== "SCRIPT") {
// parse everything else...
continue;
}
@Integralist
Integralist / 1. Example.scss
Created October 22, 2012 14:10
Sass Mixin for CSS3 Animations
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: