Skip to content

Instantly share code, notes, and snippets.

View dustintheweb's full-sized avatar
🎯
Focusing

Dustin Hoffmann dustintheweb

🎯
Focusing
View GitHub Profile
Verifying that +dustintheweb is my openname (Bitcoin username). https://onename.io/dustintheweb
@dustintheweb
dustintheweb / self-hosted-font-face-stack-android-stock-browser-fix.css
Last active August 29, 2015 14:06
Self Hosted @font-face Webfont Stack With Stock Android Browser Fix
@font-face {
font-family:"FontName";
src:url("fonts/fontname.eot");
src:url("fonts/fontname.eot?#iefix") format("eot"),url("fonts/fontname.woff") format("woff"),url("fonts/fontname.ttf") format("truetype"),url("fonts/fontname.svg#fontname") format("svg");
font-weight: 400;
font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio:0) { // android fix
@font-face {
font-family:"FontName";
@dustintheweb
dustintheweb / show-namespace-global-variables
Created August 15, 2014 20:18
Javascript - Show All Global Variables Assigned to a Specific Namespace
for(var g in window) {
if(window.hasOwnProperty(g)) console.log(g);
}
// replace window with custom namespace if needed
@dustintheweb
dustintheweb / app.yaml
Last active August 29, 2015 14:03
Create a simple CDN with Google App Engine
application: your-app-cdn
version: 1
api_version: 1
runtime: python27
threadsafe: true
handlers:
# web files
- url: /(.*\.css)
mime_type: text/css
@dustintheweb
dustintheweb / google-app-engine-cloud-git-sourcetree.md
Last active November 26, 2021 08:13
Set up a Google Cloud Git Repo in SourceTree

###Setting up a Google Cloud Git Repo // now with SourceTree bonus!
*Note: this guide is relavent only to repos natively hosted on Google Cloud


**Prereq:** - OSX - SourceTree - git - A Google App Engine / Cloud project
@dustintheweb
dustintheweb / app.yaml
Last active December 2, 2015 10:10 — forked from cagatay/app.yaml
Google App Engine (Python) - app.yaml for hosting a static site
application: your-app-name
version: 1
runtime: python27
api_version: 1
threadsafe: true
default_expiration: "30d"
handlers:
# web files
@dustintheweb
dustintheweb / guide-grunt-workflow
Last active August 29, 2015 14:03
Guide: OSX Grunt Setup & Basic Workflow
## First Run:
-----------------------
/// Add Project Dependencies
Homebrew
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Success?
@dustintheweb
dustintheweb / self-clearing-settimeout.js
Last active August 29, 2015 14:01
Self Clearing setTimeout
var timer = setTimeout(function() {
// code stuffs
clearTimeout(timer);
}, 500);
@dustintheweb
dustintheweb / modernizr-cdn-fallback.js
Last active August 29, 2015 14:01
Modernizr load CDN script with local fallback
Modernizr.load([{
load: [
'//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'
],
complete: function() {
if (!window.jQuery) {
console.log('## CDN Failed - Loading local version of jQuery.');
Modernizr.load('/js/jquery.min.js');
};
}
@dustintheweb
dustintheweb / convert-svg-png
Created May 1, 2014 21:05
Batch Convert SVG to PNG (transparent/ alpha) using ImageMagick
// ImageMagick - Convert SVG to PNG w/ transparency
//
// - open terminal
//
// - confirm you have imagemagick installed
// --- type: convert -v
//
// - cd to folder
//
// - single file