Skip to content

Instantly share code, notes, and snippets.

View schutzsmith's full-sized avatar

Daniel Schutzsmith schutzsmith

View GitHub Profile
@schutzsmith
schutzsmith / new_gist_file.css
Last active August 29, 2015 14:02 — forked from spigists/new_gist_file.css
Gravity Forms Bootstrap CSS
.gform_wrapper ul {
padding-left: 0;
list-style: none; }
.gform_wrapper li {
margin-bottom: 15px; }
.gform_wrapper form {
margin-bottom: 0; }
@schutzsmith
schutzsmith / DragTransform
Last active August 29, 2015 14:10 — forked from fta2012/DragTransform
Drag Transform JQuery Script
var selector = 'img' // Replace this with the selector for the element you want to make transformable
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() {
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() {
(function() {
var $, applyTransform, getTransform, makeTransformable;
$ = jQuery;
@schutzsmith
schutzsmith / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@schutzsmith
schutzsmith / css-select
Created May 24, 2015 12:08
Custom Text Selection
::selection { background: #e2eae2; }
::-moz-selection { background: #e2eae2; }
::-webkit-selection { background: #e2eae2; }
tbody tr:nth-child(odd) {
background-color: #ccc;
}
input[type=text], textarea {
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
outline: none;
padding: 3px 0px 3px 3px;
margin: 5px 1px 3px 0px;
border: 1px solid #ddd;
}
@schutzsmith
schutzsmith / gist:136510fff6690a1328fa
Created May 25, 2015 14:08
Style Links Based on File Type
/* external links */
a[href^="http://"] {
padding-right: 13px;
background: url('external.gif') no-repeat center right;
}
/* emails */
a[href^="mailto:"] {
padding-right: 20px;
background: url('email.png') no-repeat center right;
@schutzsmith
schutzsmith / gist:e8d0b250e1291902ed26
Created May 25, 2015 14:09
Display URLs In A Printed Page
@media print {
a:after {
content: " [" attr(href) "] ";
}
}
@schutzsmith
schutzsmith / gist:2d0ea341486af3e545b2
Last active August 29, 2015 14:21
Change Permalink Based on Custom Field
add_action('init', 'tdd_add_rewrite_rules');
function tdd_add_rewrite_rules()
{
// Register custom rewrite rules
global $wp_rewrite;
$wp_rewrite->add_rewrite_tag('%your_post_type%', '([^/]+)', 'your_post_type=');
@schutzsmith
schutzsmith / gulpfile.js
Created April 16, 2016 15:42 — forked from geelen/gulpfile.js
Harp with BrowserSync! Woo!
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var harp = require('harp');
/**
* Serve the Harp Site from the src directory
*/
gulp.task('serve', function () {
harp.server(__dirname + '/src', {