Skip to content

Instantly share code, notes, and snippets.

@gmilby
gmilby / app.html
Created November 6, 2013 20:28
angular ajax request with $http
<h1>{{model.message}}</h1>
@gmilby
gmilby / php_server_on_demand.php
Created July 3, 2013 14:56
'trying' to make a script to execute by script... definitely note safe, but it doesn't matter - it doesn't work :-P
<?php
function exec_local_url($url) {
exec('/usr/bin/wget -O - -q -t 1 "http://'. $_SERVER['HTTP_HOST'] .'/'
. addslashes($url) . '" >/dev/null 2>&1'
);
}
exec_local_url('php -S localhost:1000 -t .');
// exec(php -S localhost:1000);
@gmilby
gmilby / jQuery.ajaxQueue.min.js
Created August 8, 2012 17:19 — forked from gnarf/jQuery.ajaxQueue.min.js
jQuery.ajaxQueue - A queue for ajax requests
/*
* jQuery.ajaxQueue - A queue for ajax requests
*
* (c) 2011 Corey Frang
* Dual licensed under the MIT and GPL licenses.
*
* Requires jQuery 1.5+
*/
(function(a){var b=a({});a.ajaxQueue=function(c){function g(b){d=a.ajax(c).then(b,b).done(e.resolve).fail(e.reject)}var d,e=a.Deferred(),f=e.promise();b.queue(g),f.abort=function(h){if(d)return d.abort(h);var i=b.queue(),j=a.inArray(g,i);j>-1&&i.splice(j,1),e.rejectWith(c.context||c,[f,h,""]);return f};return f}})(jQuery)