Skip to content

Instantly share code, notes, and snippets.

View gerardpaapu's full-sized avatar
🏠
Working from home

Gerard Paapu gerardpaapu

🏠
Working from home
View GitHub Profile
[
{
"filename": "c:\\code\\Content\\ext-4.2\\ext-all-debug-w-comments.js",
"provides": [
{
"type": "filename",
"filename": "c:\\code\\ext-4.2.1.883\\src\\ZIndexManager.js"
},
{
"type": "classname",
I found problems in these TZs
In Amman (+03:00): new Date(2014, 2, 28).getDate() != 28
In Beirut (+03:00): new Date(2013, 2, 31).getDate() != 31
In Jerusalem (+03:00): new Date(2013, 2, 29).getDate() != 29
In Tehran (+03:30): new Date(2013, 2, 22).getDate() != 22
In Baku (+05:00): new Date(2013, 2, 31).getDate() != 31
In Adelaide (+10:30): new Date(2013, 9, 6).getDate() != 6
In Canberra (+11:00): new Date(2013, 9, 6).getDate() != 6
In Hobart (+11:00): new Date(2013, 9, 6).getDate() != 6
function arraySum(i) {
'use strict';
function type(obj) {
// Object.prototype.toString provides a way to reliably identify
// builtin javascript types like Array, Number and String, but
// will fail (in older browsers) if called on null or undefined
//
// The relevant specs:
//
// http://es5.github.io/#x15.2.4.2
@gerardpaapu
gerardpaapu / csv.js
Last active December 23, 2015 07:59
// A Parslet parser for parsing CSV files
//
// ported from http://hackage.haskell.org/packages/archive/csv/0.1.1/doc/html/Text-CSV.html
define(['./parslet'], function (parslet) {
'use strict';
var Parser = parslet.Parser;
function join(arr) { return arr.join(''); }
// csv :: Parser CSV
var apply = Function.prototype.apply;
var flatten = apply.bind([].concat, []);
Array.of = function (a) {
return [a];
};
Array.prototype.chain = function (f) {
return flatten(this.map(f));
};
(function (
$aaaa, $aaab, $aaac, $aaad, $aaae, $aaaf, $aaag, $aaah,
$aaai, $aaaj, $aaak, $aaal, $aaam, $aaan, $aaao, $aaap, $aaaq,
$aaar, $aaas, $aaat, $aaau, $aaav, $aaaw, $aaax, $aaay, $aaaz,
$aaba, $aabb, $aabc, $aabd, $aabe, $aabf, $aabg, $aabh, $aabi,
$aabj, $aabk, $aabl, $aabm, $aabn, $aabo, $aabp, $aabq, $aabr,
$aabs, $aabt, $aabu, $aabv, $aabw, $aabx, $aaby, $aabz, $aaca,
$aacb, $aacc, $aacd, $aace, $aacf, $aacg, $aach, $aaci, $aacj,
$aack, $aacl, $aacm, $aacn, $aaco, $aacp, $aacq, $aacr, $aacs,
$aact, $aacu, $aacv, $aacw, $aacx, $aacy, $aacz, $aada, $aadb,
@gerardpaapu
gerardpaapu / markov.js
Created May 9, 2013 09:05
Experimenting with markov chains
All bribery and dwell in Jerusalem, seeking ing the LORD of a garment; And he saith, To the counsel of his throne, saying, this second time, and in his place. Trust in the interpretation; the tenths and there remained among all nations bow down the earth, which now I will but thou shalt drive out of heart, My praise unto the atonement, whereby they are not drink it. So thy wonders have wounded him that he to him the adoption, the son of their order, and the children of gold in the mountain on this thing by their nakedness of waters, that is girded on us, it came unto me, and spoiled them. Let the land of and they put evil of the daughter of Israel that told the heritage unto them, and escape out of For behold king of their dwelling among great nation in unto them, They envied him. He hath kept close, and he shall speak. Consume in the children of the LORD will slay me. When thou shalt put all thy dishonest gain. For we all the but whosoever believeth all his name Apollyon. One land into the inheritance in the
@gerardpaapu
gerardpaapu / Farse.fs
Last active December 16, 2015 15:28
Parser combinators in f-sharp
open System
module Farse =
type 'a Cont = 'a * string
type 'a Result = 'a Cont list
type 'a Parser = Parser of (string -> Cont<'a> list)
let parseWith = function
| Parser p -> p
@gerardpaapu
gerardpaapu / gist:5380674
Created April 13, 2013 23:55
My top 16 for the Raw comedy quest
My top 16 for the Raw comedy quest
Maarten "Burn It To The Ground" Idema
James "Jimmy" Stewart
Tim "Jesus Is Real" Muller
Fooz "Fredward" Alhili
Luke "I Am Your Father" Callaghan
Ashton "I Am Not" Brown
Jimmy "Ewok" Guan
// The MIT License (MIT)
// Copyright (c) 2013 Gerard Paapu
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN