array_intersect(array1, array2, ..., arrayN)
The idea is simple and comes from here: http://pioupioum.fr/developpement/javascript-array-intersection.html.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- I'd gladly pay you Tuesday for a hamburger today! | |
-- OK, see you next Tuesday. | |
SELECT * | |
FROM generate_series | |
( | |
current_date + '1 day'::interval, -- in case now() is same dow | |
current_date + '7 days'::interval, | |
'1 day' | |
) as s(a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxD3XS3Ltwl7lrOiMvezS7HPGqHYQrBUE6AtuHfezyz37Mgpq75bYJ5DiHAOYmlQW7hNrylhnBDKRL364a9GzM0ZT2mnts9Zehjwmq7qF3ZId5n2AknNIoKA+ZWNBg0T7T/ZcCvXmbRZGddt9d2s5wuVDq7GaSASPIwC5Qq2hdPDg7KLxuCa8h93aNl/0PCkE3Nkzq5FQuY0VHPQl6sCjTIKDhz3WE5zcrvMx+mtriLQSLd4xHIbthsKAF62wjyO4Kq0KB8DZEMZY75/KdYXDZermzSG9xLqPs7is/Whh/w4040497bqaH7YbOp77/Faj5aABbDtjeQPKRfeEwhDl2Q== [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG/MacGPG2 v2.0.17 (Darwin) | |
mQINBFELLu4BEADH0UGRjIJbGBo/XMDLzxcegF865HD2ND9oBv+Re0GBYhzAuIWA | |
ply+m3/atz24ipKQBeHdL109Gm5p76d3QR6/dT8EzY+PWSFSlRwRssxp1V5d/rQH | |
qekbNJL+XUCILynRX2weXarDNOJs/HESYzm3T3rs3m5jdUuz7p40F779vjO3wmOf | |
BW0Q4WdwX8yun+IyW93MRWpVQPAMTjn1aQQl9l1e0KssW+A6FhBR1OmVPKz26VZG | |
Ia4lbLgDwN3xpQryjme4Z4nMxY5AnW33eshFVbqhlLOzudW3HhopgTQHJ6/1+HaD | |
Tyo9NWUVmD5/qL+/06nsBEidqvBZjs22pnyboTIdfXJWF/DQYj5CGQKMTk6s8iwr | |
Zurw+F1HYJSktBc4le3fIfuzcH4snyJPyOnnZCsBBmhnTNt30s8L/p74/HeRCCmb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Infinite List View | |
creates <ul> with triggers for infinite scrolling | |
@author Kevin Jantzer, Blacktone Audio Inc. | |
@since 2012-11-06 | |
USE - listen for: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('ymusica').controller('AlbumSearch', ['$scope', 'Albums', 'Artists', '$q', function($scope, albums, artists, $q) { | |
$scope.albums = []; | |
$scope.artists = []; | |
var terms = new Rx.Subject(); | |
$scope.searchMusic = terms.onNext.bind(terms); | |
terms.sample(250) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var module = angular.module('racer.js', [], function ($provide) { | |
var setImmediate = window && window.setImmediate ? window.setImmediate : function (fn) { | |
setTimeout(fn, 0); | |
}; | |
var racer = require('racer'); | |
$provide.factory('racer', ['$http', '$q', '$rootScope', function ($http, $q, $rootScope) { | |
$http.get('/model').success(function (data) { | |
racer.init(data); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('MyApp', ['racer.js']). | |
config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { | |
//$locationProvider.html5Mode(true); | |
$routeProvider. | |
when('/', { templateUrl: 'partials/home.htm', controller: IndexCtrl, resolve: IndexCtrl.resolve }) | |
otherwise({redirectTo: '/'}); | |
}]); | |
function Ctrl($scope, model) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A streaming byte oriented JSON parser. Feed it a single byte at a time and | |
// it will emit complete objects as it comes across them. Whitespace within and | |
// between objects is ignored. This means it can parse newline delimited JSON. | |
function jsonMachine(emit, next) { | |
next = next || $value; | |
return $value; | |
function $value(byte) { | |
if (!byte) return; | |
if (byte === 0x09 || byte === 0x0a || byte === 0x0d || byte === 0x20) { |
OlderNewer