Skip to content

Instantly share code, notes, and snippets.

/*global angular: true, google: true, _ : true */
'use strict';
angular.module('geocoder', ['ngStorage']).factory('Geocoder', function ($localStorage, $q, $timeout) {
var locations = $localStorage.locations ? JSON.parse($localStorage.locations) : {};
var queue = [];
// Amount of time (in milliseconds) to pause between each trip to the
// Example 1
mediator.name = 'Doug';
mediator.subscribe('nameChange', function(arg){
console.log(this.name);
this.name = arg;
console.log(this.name);
});
mediator.publish('nameChange', 'Jorn');
sinon / chai / mocha / js-tests
_____________________________________
#### chai
expect(subject).not.equal(expected)
.a('string')
.instanceof(Foo)
@manadan999
manadan999 / DB_cache.php
Last active December 20, 2015 13:29
This is the file which I am using. I am using MemcacheSASL as client.
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
require_once APPPATH.'libraries/MemcacheSASL.php';
//require_once('phpsqlparser/php-sql-parser.php');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer