Skip to content

Instantly share code, notes, and snippets.

barahilia /
Last active Aug 29, 2015
Points compression algo
barahilia /
Created Oct 12, 2014
Kramdown yellow highlight
Fill details here...
barahilia / workaround.js
Created Sep 9, 2014
Workaround for R# complaining on use of an implicitly declared global variable
View workaround.js
// This is a workaround for R# complaining on undefined global variables.
// In practice they come from and are defined by Jasmine and Protractor
// frameworks, so are not a real issues.
// Jasmine
var describe = function () { };
var beforeEach = function () { };
var afterEach = function () { };
barahilia / tdd-trees-comp-c++
Last active Aug 29, 2015
TDD for trees comparison in C++
View tdd-trees-comp-c++
Build with: `g++ test.cpp && ./a.out`
For editing two files in `vim` run command `:vsplit tree.h`.
barahilia / json-pattern-matcher
Last active Aug 29, 2015
JSON pattern matching
View json-pattern-matcher
Allows match JSON objects by pattern. Intended for APIs comparison and verification.
{ a: 1, b: ['x', 'y'] }, // pattern
{ a: 42, b: ['first', 'second', 'any', 'last'] } // object for check
barahilia / run-jasmine.js
Last active Mar 2, 2017 — forked from dlidstrom/run-jasmine.js
Runs Jasmine tests using PhantomJS. Adapted for use within TeamCity..Compatible with Jasmine 2.0.
View run-jasmine.js
var system = require('system'),
env = system.env;
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
* @param testFx javascript condition that evaluates to a boolean,
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
* as a callback function.