Skip to content

Instantly share code, notes, and snippets.

View thissideup's full-sized avatar

Aleksandrs Krjukovs thissideup

View GitHub Profile
Date,Signal,Signal2
8/20/2020 16:00:00,0,0
8/21/2020 16:00:00,1,1
8/24/2020 16:00:00,1,1
8/25/2020 16:00:00,1,1
8/26/2020 16:00:00,1,1
8/27/2020 16:00:00,1,1
8/28/2020 16:00:00,1,1
8/31/2020 16:00:00,1,1
9/1/2020 16:00:00,1,1
@thissideup
thissideup / gist:4345783
Created December 20, 2012 15:03
A take on managed/pooled objects. A lot simpler (naive?) than https://github.com/playcraft/gamecore.js/blob/master/src/pooled.js Will have to compare performance… On the other hand — plays well with the closure compiler's advanced optimizations. https://github.com/playcraft/gamecore.js/blob/master/src/pooled.js
'use strict';
/**
* Base class for managed objects. It expects it's descendants to have a pool
* array. Initialization and de-initialization logic should be moved to the
* initInternal and releaseInternal.
* Managed objects are marked as reusable by a call to the release method.
*/
var Managed = function() {
@thissideup
thissideup / compiled.js
Created April 5, 2012 07:30
Closure compiler array access function optimizations.
'use strict';function a(c, f) {
var h = Array.prototype.slice.call(arguments, 1);
return function() {
var d = Array.prototype.slice.call(arguments);
d.unshift.apply(d, h);
return c.apply(this, d)
}
}
;function b(c, f) {
return f[c - 1]
@thissideup
thissideup / soyutils.js
Created January 10, 2012 07:10
Soyutils for jsperf template shootout.
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software