Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
// create list of unused stylesheet rules | |
$(document).ready(function() | |
{ | |
var sel = []; | |
for( var s = 0 ; s < document.styleSheets.length ; s++ ) { | |
var rules = document.styleSheets[s].cssRules || document.styleSheets[s].rules; | |
for( var r = 0 ; r < rules.length ; r++ ) { |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
@mixin box-shadow($top, $left, $blur, $color, $inset: false) { | |
@if $inset { | |
-webkit-box-shadow:inset $top $left $blur $color; | |
-moz-box-shadow:inset $top $left $blur $color; | |
box-shadow:inset $top $left $blur $color; | |
} @else { | |
-webkit-box-shadow: $top $left $blur $color; | |
-moz-box-shadow: $top $left $blur $color; | |
box-shadow: $top $left $blur $color; | |
} |
The goal is to add N new elements to the DOM as quickly and as painlessly as possible.
I have access to jQuery and found the code below to be faster than the following:
$(parentElement)
.append(Array(1001).join(template))
;
#!/usr/bin/env node | |
fs = require("fs") | |
path = require("path") | |
child_process = require("child_process") | |
//------------------------------------------------------------------------------ | |
PROGRAM = path.basename(__filename) | |
VERSION = "0.2.0.2012-10-09" |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="robots" content="noodp, noydir" /> | |
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com"> | |
<link rel="canonical" href="http://mysite.com/" /> | |
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" /> |
#!/usr/bin/env node | |
var fs = require('fs'), | |
util = require('util'); | |
// Rattern to format the message with the issue ID | |
var MESSAGE_FORMAT = '[%s] %s'; | |
// Git commit messages are stored in a file, passed as argument to the script | |
// First and second arguments will be 'node' and the name of the script | |
var commitFile = process.argv[2]; |