Skip to content

Instantly share code, notes, and snippets.

View betweenbrain's full-sized avatar
🎯
Focusing

Matt Thomas betweenbrain

🎯
Focusing
View GitHub Profile
@AmyStephen
AmyStephen / Messages.xml
Created May 19, 2012 13:32
Molajo Data Sources
<?xml version="1.0" encoding="utf-8"?>
<model
name="Messages"
catalog_type_id="0"
table="#__dummy"
primary_key=""
primary_prefix=""
get_customfields="0"
get_item_children="0"
use_special_joins="0"
@briancavalier
briancavalier / simple-promise-retry.js
Created February 24, 2011 18:35
A few general patterns for retries using promises
function keepTrying(otherArgs, promise) {
promise = promise||new Promise();
// try doing the important thing
if(success) {
promise.resolve(result);
} else {
setTimeout(function() {
keepTrying(otherArgs, promise);
@mudge
mudge / .htaccess
Created November 7, 2008 14:48
Remove file extensions in URLs with mod_rewrite but preserve 404 errors.
# The following will allow you to use URLs such as the following:
#
# example.com/anything
# example.com/anything/
#
# Which will actually serve files such as the following:
#
# example.com/anything.html
# example.com/anything.php
#