Skip to content

Instantly share code, notes, and snippets.

View zgstyle's full-sized avatar

Zigurds zgstyle

View GitHub Profile
@zgstyle
zgstyle / gist:0b4711ae395f7c6e502b5ad1bdbd012a
Created June 14, 2016 10:54 — forked from paulirish/gist:5558557
a brief history of detecting local storage

A timeline of the last four years of detecting good old window.localStorage.


Jan Lenhart, bless his heart contributed the first patch for support:

October 2009: 5059daa

@zgstyle
zgstyle / jquery.transparentsubmit.js
Created May 5, 2016 06:24 — forked from SaneMethod/jquery.transparentsubmit.js
jQuery transparent submission plugin - uses iFrames to allow for an 'ajax-like' submission of a form to some endpoint, and retrieve the json, html or text response offered by that server to said frame.
/**
* jQuery plugin for transparent submission of a form using an $.ajax-like interface.
* Usage Examples:
* $.transparentSubmit({dataType:'json', form:$('#myForm')})
* $('#myForm').transparentSubmit({dataType:'html'})
* Supports Deferred (.done, .fail, .when, etc.)
*/
(function($){
$.transparentSubmit = function(options){
var defer = $.Deferred(), // Deferred object whose promise we will hook into when adding .done, etc to calls
@zgstyle
zgstyle / tmux_cheatsheet.markdown
Last active August 29, 2015 14:27 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@zgstyle
zgstyle / EmptyWidget.php
Created April 15, 2012 16:27 — forked from jonathonbyrdziak/CustomWidgetFile.php
Plugin code to create a single widget in wordpress.
<?php
/**
* @package RedRokk
* @version 1.0.0
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Empty_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com
@zgstyle
zgstyle / _mixins.sass
Created March 17, 2012 11:50
SASS: Shared mixins
@import "variables"
// Mixins
-------------------------------------------------------------------------- {{{
=db
display: block
=di
display: inline
=dib
display: inline-block