Skip to content

Instantly share code, notes, and snippets.

View cbracco's full-sized avatar

Chris Bracco cbracco

View GitHub Profile
@nathansmith
nathansmith / module_pattern_init.js
Created January 11, 2010 17:08
Init + Module Pattern JS
// JS Module Pattern:
// http://j.mp/module-pattern
// Redefine: $, window, document, undefined.
var APP = (function($, window, document, undefined) {
// Automatically calls all functions in APP.init
$(document).ready(function() {
APP.go();
});
@t8g
t8g / Fetch.sublime-settings
Created January 3, 2012 14:36
Nettuts Fetch Sublimetext2
{
"files":
{
"cycle": "http://malsup.github.com/jquery.cycle.all.js",
"infinite_scroll": "https://github.com/paulirish/infinite-scroll/blob/master/jquery.infinitescroll.min.js",
"jquery": "http://code.jquery.com/jquery.min.js",
"localscroll": "http://flesler-plugins.googlecode.com/files/jquery.localscroll-1.2.7-min.js",
"raphael": "http://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js",
"reset": "http://meyerweb.com/eric/tools/css/reset/reset.css",
"scrollorama": "https://github.com/johnpolacek/scrollorama/blob/master/js/jquery.scrollorama.js",
@zachleat
zachleat / gist:2008932
Created March 9, 2012 21:56
Prevent zoom on focus
// * iOS zooms on form element focus. This script prevents that behavior.
// * <meta name="viewport" content="width=device-width,initial-scale=1">
// If you dynamically add a maximum-scale where no default exists,
// the value persists on the page even after removed from viewport.content.
// So if no maximum-scale is set, adds maximum-scale=10 on blur.
// If maximum-scale is set, reuses that original value.
// * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0">
// second maximum-scale declaration will take precedence.
// * Will respect original maximum-scale, if set.
// * Works with int or float scale values.
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active January 23, 2024 02:28
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com).

Contents

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 5, 2024 13:30
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@xjamundx
xjamundx / svg.md
Created August 14, 2012 20:12
Everything I Know About SVG

Everything I Know About SVG

SVG is arguably going to be the main image format of the modern web. I recently wrote an article for Safari Books Online called SVG Icons for New Devices that covers some of the basics of dealing with SVG. This article covers more the pain points of using SVG in production and as it turns out there are many.

Plain Old <img> Tags

Here's how you link to your amazing vector image.

<img src="/images/logo.svg">
@jswebschmiede
jswebschmiede / snippet.js
Created September 6, 2012 22:31 — forked from necolas/snippet.js
Optimised async loading of cross-domain scripts
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
* Tip: http://pivotallabs.com/users/jdean/blog/articles/1400-working-with-asynchronously-loaded-javascript
*/
(function(doc, script) {
var js,
@Cosmicist
Cosmicist / gist:3860074
Created October 9, 2012 17:05 — forked from wrboyce/gist:786460
pre-commit hook to automatically minify javascript/css
#!/bin/bash
# Search YUI Compressor anywhere in your home dir
echo "Searching for YUI Compressor..."
YUIC=`find ~/. -type f -name yuicompressor\*.jar`
if ! [ $YUIC ]
then
echo "Unable to find YUI Compressor! Goodbye!"
exit
fi
@malarkey
malarkey / Contract Killer 3.md
Last active May 8, 2024 16:02
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@joshnesbitt
joshnesbitt / watch.rb
Created November 30, 2012 15:05 — forked from JamieMason/watch.rb
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]