Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am skope on github.
  • I am skope (https://keybase.io/skope) on keybase.
  • I have a public key whose fingerprint is 48EA 668C 2275 B7F3 7802 10DC 5D1A 9E9F 4681 C6F0

To claim this, I am signing this object:

function compileTemplate (template, data) {
return template.replace(/\{\{[^>]+?\}\}/g, function(item) {
return data[item.replace(/\{|\}/g, '').trim()] || item;
});
};
57.10 Acceptable Use; Safety-Critical Systems. Your use of the Lumberyard Materials must comply with the AWS Acceptable Use Policy.
The Lumberyard Materials are not intended for use with life-critical or safety-critical systems, such as use in operation of medical
equipment, automated transportation systems, autonomous vehicles, aircraft or air traffic control, nuclear facilities, manned spacecraft,
or military use in connection with live combat. However, this restriction will not apply in the event of the occurrence
(certified by the United States Centers for Disease Control or successor body) of a widespread viral infection transmitted via
bites or contact with bodily fluids that causes human corpses to reanimate and seek to consume living human flesh, blood, brain
or nerve tissue and is likely to result in the fall of organized civilization.
root
manage.py
app
settings.py
...
static
app
main.css
function foo(bar) {
return function(baz) {
console.log(bar + baz);
}
}
var lol = foo('asdf');
lol('werw');
Strophe.addConnectionPlugin("xdomainrequest", {
init: function () {
if (window.XDomainRequest) {
Strophe.debug("using XdomainRequest for IE");
// override the send method to fire readystate 2
if (typeof XDomainRequest.prototype.oldsend == 'undefined') {
XDomainRequest.prototype.oldsend = XDomainRequest.prototype.send;
XDomainRequest.prototype.send = function() {
XDomainRequest.prototype.oldsend.apply(this, arguments);
public function check_overlap($start_date1, $end_date1, $start_date2, $end_date2)
{
$start = new DateTime($start_date1);
$end = new DateTime($end_date1);
$start2 = new DateTime($start_date2);
$end2 = new DateTime($end_date2);
if ($start <= $end2 && $end >= $start2) {
return true;
public function __construct()
{
parent::__construct();
$this->load->database();
}
@skope
skope / gist:7987174
Last active December 31, 2015 12:39
array(
0 => array(
'day' => 1,
'bookings' => array(
0 => array(
'id': 1,
'client_id': 12,
'information': 'homoilua'
)
)
12 =>
array (size=6)
'id' => string '84' (length=2)
'client_id' => string '18' (length=2)
'time_from' => string '2013-12-10' (length=10)
'time_to' => string '2013-12-24' (length=10)
'information' => string '' (length=0)
'ad_slot' => string '3' (length=1)