This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ZC fields render | |
* | |
* When on a Zoho Creator form scriptbuilder page, paste this into your javascript console | |
* (if on FF I recommend firebug) & execute it. This will render a DS code for all of the form fields | |
* DOUBLE CLICK the textarea created to remove it | |
* | |
* @param string m -Change to "insert","collect", or "update" to change the DS code output | |
* @param string r -Change to whatever you want your record collection variable to be | |
* @author Stephen Rhyne @srhyne |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. DOUBLE BAD!! | |
$("#myLink").attr("name","srhyne"); | |
$("#myLink").attr("href","http://stephenrhyne.com"; | |
$("myLink").html("stephenrhyne.com"); | |
// 2. IN MY OPINION STILL VERY BAD.. | |
$("#mylink") | |
.attr("name","srhyne") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Page Refresh</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script> | |
$(function(){ | |
var zoho, url, request; | |
zoho = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Wrap in self-invoking anonymous function: | |
(function($){ | |
// Extend jQuery's native ':' | |
$.extend($.expr[':'],{ | |
// New method, "data" | |
data: function(a,i,m) { | |
var e = $(a).get(0), keyVal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// avoid using anon function cb's for high touch events | |
$("div").mousemove(function(){ | |
//this function is re-created every time w/ obvious overhead | |
}); | |
//avoid re-creating Class methods in a constructor pattern. Use prototype instead | |
//instead of this... | |
function Person(first, last){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011 | |
* http://benalman.com/ | |
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ | |
(function($) { | |
var o = $({}); | |
$.subscribe = function() { | |
o.on.apply(o, arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// APPCELERATOR - STACKMOB IOS MODULE | |
// | |
// aaron@clearlyinnovative.com | |
// blog.clearlyinnovative.com | |
// | |
// http://stackmob.com | |
// | |
var window = Ti.UI.createWindow({ | |
backgroundColor: 'white' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.tmpl = function(obj){ | |
var str, keys, _do; | |
//store string | |
str = this.toString(); | |
//if no object just return string | |
if(!obj || typeof obj !== "object"){ | |
return str; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// - jquery.event.fastfix.js | |
(function () { | |
// http://bitovi.com/blog/2012/04/faster-jquery-event-fix.html | |
// https://gist.github.com/2377196 | |
// IE 8 has Object.defineProperty but it only defines DOM Nodes. According to | |
// http://kangax.github.com/es5-compat-table/#define-property-ie-note | |
// All browser that have Object.defineProperties also support Object.defineProperty properly | |
if(Object.defineProperties) { | |
var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'beanstalkapp' | |
Beanstalk::API::Base.setup( | |
:domain => "your_beanstalk_account_subdomain", | |
:login => "login", | |
:password => ENV['BEANSTALK_PW'] | |
) |
OlderNewer