Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Schutzsmith schutzsmith

View GitHub Profile
@schutzsmith
schutzsmith / new_gist_file.css
Last active Aug 29, 2015 — forked from spigists/new_gist_file.css
Gravity Forms Bootstrap CSS
View new_gist_file.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 Aug 29, 2015 — forked from fta2012/DragTransform
Drag Transform JQuery Script
View DragTransform
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 Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// 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
Custom Text Selection
View css-select
::selection { background: #e2eae2; }
::-moz-selection { background: #e2eae2; }
::-webkit-selection { background: #e2eae2; }
View gist:05f3ce4e49d977eb5945
tbody tr:nth-child(odd) {
background-color: #ccc;
}
View gist:b97f95541146d248e4ae
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
Style Links Based on File Type
View gist:136510fff6690a1328fa
/* 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
Display URLs In A Printed Page
View gist:e8d0b250e1291902ed26
@media print {
a:after {
content: " [" attr(href) "] ";
}
}
@schutzsmith
schutzsmith / gist:2d0ea341486af3e545b2
Last active Aug 29, 2015
Change Permalink Based on Custom Field
View gist:2d0ea341486af3e545b2
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 Apr 16, 2016 — forked from geelen/gulpfile.js
Harp with BrowserSync! Woo!
View gulpfile.js
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', {