Skip to content

Instantly share code, notes, and snippets.

View ryanfitzer's full-sized avatar

Ryan Fitzer ryanfitzer

View GitHub Profile
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@ryanfitzer
ryanfitzer / gist:1372424
Created November 17, 2011 05:18 — forked from jrburke/basic.js
possible jquery plugin boilerplate
!function( root, factory ) {
// Export
if ( typeof exports === 'object' ) {
// Node/CommonJS
factory( require( 'jquery' ) );
} else if ( typeof define === 'function' && define.amd ) {
@ryanfitzer
ryanfitzer / jQuery.equalHeights.js
Created January 23, 2012 02:16
Optimized `equalHeights()`
$.fn.equalHeights = function( px ) {
$( this ).each( function() {
var currentElement,
currentHeight,
currentTallest = 0,
children = $( this ).children();
children.each( function() {
@ryanfitzer
ryanfitzer / build.js
Last active December 15, 2015 04:29
CSSCat does not copy the files into a new directory before processing. The following snippet shows how to use use CSSCat's fs-helper.js in your build.js file to create a copy of the original directory.
!function() {
var path = require( 'path' )
, csscat = require( 'csscat' )
, fsh = require( 'csscat/lib/fsh' )
;
// The directory to copy (relative to this file)
var original = './';
@ryanfitzer
ryanfitzer / package.json
Last active December 18, 2015 16:19
Simple example project for using Volo to add libraries to a project. Use the "Download Gist" button to use as a readymade quickstart.
{
"name": "Volo-Example",
"version": "0.0.1",
"description": "Kick the tires.",
"author": "Me",
"volo": {
"baseUrl": "library/js",
"dependencies": {
"jquery": "github:jquery/jquery/2.0.2",
"Modernizr": "github:Modernizr/Modernizr/v2.6.2"
@ryanfitzer
ryanfitzer / Gruntfile.js
Last active December 18, 2015 16:28
Simple example project for using the grunt-preprocess task to easily build files based on custom variables. Use the "Download Gist" button to use as a readymade quickstart.
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),
buildPath: '../<%= pkg.name %>-build/',
clean: {
options: {
@ryanfitzer
ryanfitzer / Gruntfile.js
Last active August 30, 2016 15:34
An example of how to use [node-ssi](https://npmjs.org/package/ssi) in a custom Grunt task to inline all your apache includes.
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),
buildPath: '../<%= pkg.name %>-build/',
clean: {
#!/bin/bash
function usage {
echo "USAGE: git merge-svn <from> [<to>]"
echo ""
echo " from The branch name to be merged FROM"
echo " to Optional branch name to be merged onto. Default: HEAD"
echo ""
}
@ryanfitzer
ryanfitzer / index.js
Created September 11, 2016 00:25
Bookmarklet for Duck Duck Go to Google Search
javascript:(function()%7Bwindow.location.assign('https%3A%2F%2Fwww.google.com%2Fsearch%3F'%2B%2Fq%5B%5E%26%5D%2B%2F.exec(window.location.search))%7D)()
@ryanfitzer
ryanfitzer / fragment.xml
Created September 28, 2016 22:04
Word TOC XML Fragment
<w:p w14:paraId="72754A29" w14:textId="77777777" w:rsidR="00E76149" w:rsidRDefault="00E76149">
<w:pPr>
<w:pStyle w:val="TOC1"/>
<w:tabs>
<w:tab w:val="right" w:leader="dot" w:pos="9350"/>
</w:tabs>
<w:rPr>
<w:rFonts w:eastAsiaTheme="minorEastAsia"/>
<w:noProof/>
</w:rPr>