Skip to content

Instantly share code, notes, and snippets.

@hughfdjackson
hughfdjackson / gist:1266494
Created October 6, 2011 04:04 — forked from anonymous/gist:1266473
omatase_ - pastebin.com/DSaZDqvG
{
publishers: {},
fire: function (event) {
for (var i = 0; i < this.publishers[this.uid][event].length; i++) {
// call each listener's function
this.publishers[this.uid][event][i].listener[this.publishers[this.uid][event][i].func]();
}
},
addListener: function (uid, listener, func, event) {
@hughfdjackson
hughfdjackson / gist:1274380
Created October 9, 2011 23:46 — forked from anonymous/gist:1274367
josh99 - pastebin.com/2fbiMMxM
var age, foo;
age = 99;
foo = function() {
return age = 0;
};
foo();
console.log(age); # => 0
------------------------
@hughfdjackson
hughfdjackson / gist:1300007
Created October 19, 2011 23:42 — forked from anonymous/gist:1299957
usman - pastebin.com/1qzEnZiD
<?php
if(isset($_POST['submit1'])) {
$var1=$_POST['submit1']
echo "it works1";
}
echo " ";
if(isset($_POST['submit2'])) {
echo "it works2";
}
@hughfdjackson
hughfdjackson / gist:1300010
Created October 19, 2011 23:44 — forked from anonymous/gist:1299973
usman - usman
<html>
<form action="form.php" method="post">
<input type="submit" id="submit1" name="submit1" value="Click Me1" onclick="document.getElementbyId("submit1").value=itworks1">
<br />
<input type="submit" id="submit2" name="submit2" value="Click Me2" onclick="document.getElementbyId("submit2").value=itworks2">
<br />
<input type="submit" id="submit3" name="submit3" value="Click Me3" onclick="document.getElementbyId("submit3").value=itworks3">
<br />
@hughfdjackson
hughfdjackson / gist:1389925
Created November 23, 2011 21:10 — forked from anonymous/gist:1389924
dibs - pastebin.com/BiNQ55LA
...
message: function(x){
return "with for loop this would return. " + x;
},
calculate: function(){
var _this = this
jQuery.each(fees_table, function (i, v) {
//console.dir(v);
$('#multiple_date_select').multiDatesPicker({
numberOfMonths: 3,
dateFormat: 'mm/dd/yy',
altField: '#meeting_dates',
addDisabledDates: json_data.meeting_dates,
minDate: json_data.start_date,
maxDate: json_data.end_date
});
// want to do this
!function(){
var scroll = window.onscroll || function(){}
window.onscroll = function(){
scroll()
instance.scrolled += 1
}
}()
@hughfdjackson
hughfdjackson / gist:1495286
Created December 19, 2011 03:45 — forked from anonymous/gist:1495280
galamar - pastebin.com/MnRqKrry
<!DOCTYPE HTML>
<html>
<head>
<title>Pizza To Go</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Pizza To Go</h1>
<form id="f0">
@hughfdjackson
hughfdjackson / gist:1540723
Created December 30, 2011 17:37 — forked from anonymous/gist:1540718
codazoda - pastebin.com/iSQYG4DY
// Create the Iso class
function Iso() {
// Public Properties
this.canvas = '';
this.context = '';
}
Iso.prototype.init = function(div) {
@hughfdjackson
hughfdjackson / gist:1540724
Created December 30, 2011 17:37 — forked from anonymous/gist:1540718
codazoda - pastebin.com/iSQYG4DY
// Create the Iso class
function Iso() {
// Public Properties
this.canvas = undefined;
this.context = undefined;
}
Iso.prototype = {