Skip to content

Instantly share code, notes, and snippets.

View sampotts's full-sized avatar

Sam Potts sampotts

View GitHub Profile
#!/bin/bash
# Tips
# http://derickbailey.com/2014/12/27/how-to-start-nginx-on-port-80-at-mac-osx-boot-up-log-in/
# https://gist.github.com/ogrrd/5824274
# http://stackoverflow.com/questions/16002268/prevent-nginx-504-gateway-timeout-using-php-set-time-limit
# http://serverfault.com/questions/189940/how-do-you-restart-php-fpm
PHP_VERSION='56';
DOT_VERSION='5.6';
;(function() {
if (!('MutationObserver' in window)) {
return;
}
var observer = new MutationObserver(function(mutations) {  
    console.log('mutation: ' + mutations.length);
    for(var m = 0; m < mutations.length; ++m) {
        for(var n = 0; n < mutations[m].addedNodes.length; ++n) {
            findEmbed(mutations[m].addedNodes[n]);
(function($) {
'use strict';
var values = {},
settings = [];
// Grab all inputs
$(".generated-form :input").each(function() {
var $input = $(this),
name = $input.attr("name"),
<!doctype html>
<html>
<head>
<title>Redirecting...</title>
<meta http-equiv="refresh" content="0;URL=https://selz.com">
</head>
<body></body>
</html>
// Icons inside elements
// --------------------------------------------
a svg,
button svg,
label svg {
pointer-events: none;
}
@sampotts
sampotts / icons.css
Last active September 19, 2015 13:06
// Base size icon styles
// --------------------------------------------
.icon {
fill: currentColor;
width: 24px;
height: 24px;
vertical-align: -3px;
}
<svg role="img" class="icon"><use xlink:href="/path/to/sprite.svg#icon-poop"></svg>
<svg role="img" class="icon"><use xlink:href="#icon-poop"></svg>
// ==========================================================================
// SVG sprite loading
// This file should be at the top of the body to avoid a flash
// ==========================================================================
// Loading SVG in with AJAX
// ---------------------------------
(function(url) {
var id = "svg-sprite",
cb = (window.location.host.indexOf("local.") === 0);
gulp.task("sprite", function () {
return gulp
.src(input)
.pipe(svgmin())
.pipe(svgstore())
.pipe(gulp.dest(output));
});