Skip to content

Instantly share code, notes, and snippets.

http://www.marchettidesign.net/fullby/
http://www.eleventhemes.com/gridly/
http://themeforest.net/item/gridlocked-minimalistic-wordpress-portfolio-theme/full_screen_preview/245947?ref=cinim
http://themes.zeotheory.com/?theme=spaces
http://themeforest.net/item/hoarder-responsive-wordpress-blog-theme/full_screen_preview/2919551?ref=cinim
http://themeforest.net/item/gridnik-elite-portfolio-wordpress-theme/full_screen_preview/145673?ref=cinim
http://themeforest.net/item/quickly-handcrafted-wordpress-theme/full_screen_preview/4670677?ref=cinim
http://themeforest.net/item/dreame-responsive-wordpress-theme/full_screen_preview/5438510?ref=cinim
@ondrek
ondrek / textcanvas.js
Created January 28, 2014 13:30
Canvas Implementation
goog.provide( "lib.display.CanvasText" );
goog.require( "lib.display.IDisplayObject" );
goog.require( "lib.display.CanvasSprite" );
goog.require( "goog.dom" );
goog.require( "goog.events.Event" );
goog.require( "goog.asserts" );
goog.require( "easy.data.domain.placeholder.font.FontStyle" );
goog.require( "goog.math.Coordinate" );
goog.require( "easy.data.domain.Color" );
@ondrek
ondrek / gist:8537022
Created January 21, 2014 09:28
Leap Motion Code to listing in my book TurnJs with it
$(document).ready(function() {
var ctl = new Leap.Controller({enableGestures: true});
var swiper = ctl.gesture('swipe');
var totalDistance = 0;
var tolerance = 50;
var cooloff = 300;
@ondrek
ondrek / fiddle.css
Last active January 3, 2016 05:59
JSFiddle Gist
canvas { margin: 20px; }
@ondrek
ondrek / uniq-items-in-array.js
Created January 9, 2014 21:34
Remove from array all repeated items and return only uniq values in array
var _getUniqItemsFromArray = function(array){
var temp = {};
var uniqueArray = [];
for (var i = 0; i < array.length; i++) {
temp[array[i]] = true;
}
for (var k in temp) {
@ondrek
ondrek / walk.js
Created January 9, 2014 21:33
Walk recursivelly in NodeJs through all folders and subfolders and get all files
var _getFiles = function(dir) {
var results = [];
filesystem.readdirSync(dir).forEach(function(file) {
file = dir+'/'+file;
var stat = filesystem.statSync(file);
if (stat && stat.isDirectory()) {
@ondrek
ondrek / walk.js
Created January 6, 2014 21:44
Most elegant way of recursively get all files from folder
function walk(dir) {
var results = [];
fs.readdirSync(dir).forEach(function(file) {
file = dir+'/'+file;
var stat = fs.statSync(file);
if (stat && stat.isDirectory()) {
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
o o o o
o o o o
o o
o o o o o o o o o o o o
o o o o o o
o 4 o 5 o o 2 o 3 o
o o o o o o
o o o o o o o o o o o o o o o o o o
o o o o
@ondrek
ondrek / x.js
Last active December 30, 2015 03:28
every nth-second display just one second of array
sequence = ['1st','2nd','3rd','4th','5th','6th'];
function displaySequence(round, callback, i){
var i = i ? i : 0;
if (i===round) { callback(); return; }
console.log(sequence[i] + ' > add');
setTimeout(function(){
console.log(sequence[i] + ' > rmv');
@ondrek
ondrek / s.js
Created November 19, 2013 21:43
terajsia implementacia
vsetkySubory = getFromApi('zoznamVsetkychSuborov');
vsetkySubory.forEach(function(subor, index){
vsetkySubory[index] = parseTemplate(getFromApi(subor));
callback();
})
function callback(){
if (i===vsetkySubory.length) {
downloadZip() } else { i++ }