Skip to content

Instantly share code, notes, and snippets.

raw_content = JSON.parse(yield)
json.content raw_content
json.jsonp! params[:callback] if jsonp?
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$plugin_info = array(
'pi_name' => 'URL Encode',
'pi_version' => '1.1',
'pi_author' => 'Airtype Studio / BSD',
'pi_author_url' => 'http://www.airtypestudio.com/',
'pi_description' => 'Runs urlencode on a string of text.',
@douglasback
douglasback / gruntEE.txt
Last active December 14, 2015 15:29
Proposed Grunting syntax for MSM Support
grunt common:site_name
clean
jshint:site_name
concat:site_name
uglify:site_name
grunt dev:site_name
grunt common:site_name
grunt sass:site_name:dev
grunt watch:sass
@douglasback
douglasback / jqt-validator-1.2.7.js
Created October 2, 2012 14:45
jQ Tools Validator 1.2.7
/**
* @license
* jQuery Tools Validator @VERSION - HTML5 is here. Now use it.
*
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
*
* http://flowplayer.org/tools/form/validator/
*
* Since: Mar 2010
* Date: @DATE
/**
* @fileoverview A content slider.
*/
// TODO: emit events.
goog.provide("goox.ui.Slider");
goog.require("goog.dom");
goog.require("goog.style");
#! /bin/bash
cd ..
GIT_DIR='.git'
umask 002 && git reset --hard
jQuery(document).ready(function(){
$('.close-reveal-modal').on("click", function(e){
e.preventDefault();
for (var i=0; i<window.player.length; i++){
window.player[i].pauseVideo();
}
});
});
// ==UserScript==
// @name Use Chosen for Harvest Project Timesheet Selector
// @author Yahel Carmon
// @description Uses Chosen for Harvest Project Timesheet Selector. Might break if they change anything. Use at your own risk.
// @namespace https://gist.github.com/gists/1229452
// @include http://*.harvestapp.com/entry/show/*
// @include https://*.harvestapp.com/entry/show/*
// @include http://*.harvestapp.com/daily
// @include https://*.harvestapp.com/daily
// ==/UserScript==
@douglasback
douglasback / sv_performance.php
Created November 2, 2011 00:50
Add a little badge that displays the total number of queries and time spent parsing your EE template
{if member_group == '1'}
<div id="performance-widget" style="position: fixed; right: 0; bottom: 0; padding: 7px; background: rgba(0,0,0,0.7); color: white; font-family: Verdana, sans-serif; z-index: 999; ">
<span id="total-queries">{total_queries}</span> queries<br />
<span id="elapsed-time">{elapsed_time}</span> seconds
</div>
{/if}
@douglasback
douglasback / sv_rainbow_performance.php
Created November 1, 2011 19:20
More colorful performance indicator
{if member_group == '1'}
<style>
@-webkit-keyframes rainbow {
0% {
background-color: rgba(255,0,0,0.7);
}
33% {
background-color: rgba(0,255,0,0.7);
}
66% {