Skip to content

Instantly share code, notes, and snippets.

View lukasz-zak's full-sized avatar

Łukasz Żak lukasz-zak

  • Gdańsk, Poland
View GitHub Profile
@lukasz-zak
lukasz-zak / index.js
Created October 19, 2017 14:56
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const _ = require('lodash')
const advFilters = {
grapes: 'grape',
location: 'Poland'
}
@lukasz-zak
lukasz-zak / compareTests.js
Last active May 1, 2022 22:35
createElement vs createDocumentFragment
/**
* Code which I test on twitter.com
* Both tests were runing in Chrome 35.x dev tools
*
* This test just gets all a tags from html and read their content
* and then write it on end of document (body element)
*
**/
@lukasz-zak
lukasz-zak / let.js
Created April 29, 2014 22:21
Ecmascript6 - let examples
(function(){
"use strict"
var case1 = function(){
console.log("foo", foo);
if(true){
var foo = 'foo';
console.log("foo", foo);
}
console.log("foo", foo);
This file has been truncated, but you can view the full file.
10000 silly gunzTarPerm extractEntry lib/public/favicon.ico
10001 silly gunzTarPerm modified mode [ 'lib/public/favicon.ico', 438, 420 ]
10002 silly lockFile 7c2028cd-node-uuid-1-4-1 [email protected]
10003 silly lockFile 7c2028cd-node-uuid-1-4-1 [email protected]
10004 silly lockFile f662725f-node-uuid-1-4-0 node-uuid@~1.4.0
10005 silly lockFile f662725f-node-uuid-1-4-0 node-uuid@~1.4.0
10006 silly gunzTarPerm extractEntry lib/public/icons/page_white_edit.png
10007 silly gunzTarPerm modified mode [ 'lib/public/icons/page_white_edit.png', 438, 420 ]
10008 silly gunzTarPerm extractEntry lib/public/icons/page.png
10009 silly gunzTarPerm modified mode [ 'lib/public/icons/page.png', 438, 420 ]
6003 silly addNameRange number 2 { name: 'pngquant-bin',
6003 silly addNameRange range: '>=0.1.0-0 <0.2.0-0',
6003 silly addNameRange hasData: true }
6004 silly addNameRange versions [ 'pngquant-bin',
6004 silly addNameRange [ '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5' ] ]
6005 verbose addNamed [ 'pngquant-bin', '0.1.5' ]
6006 verbose addNamed [ '0.1.5', '0.1.5' ]
6007 silly lockFile 60f49643-pngquant-bin-0-1-5 [email protected]
6008 verbose lock [email protected] C:\Users\lukasz.zak\AppData\Roaming\npm-cache\60f49643-pngquant-bin-0-1-5.lock
6009 silly gunzTarPerm extractEntry test/manager.js
@lukasz-zak
lukasz-zak / gist:7346121
Last active December 27, 2015 15:09
ECMAScript 6 - const examples
(function () {
var foo = 'foo';
const bar = 'bar';
buzz = 'buzz';
console.group('Before changes');
console.info("inital value of foo:", foo);
console.log("inital value of bar:", bar);
console.log("inital value of buzz:", buzz);
console.groupEnd('Before changes');
public class Cache<K, V> {
private Map<K, __________<V>> internalCache = new HashMap<>();
public V get(K key, ___________<V> calledWhenAbsent) throws Exception {
_____________<V> something = internalCache.get(key);
V result;
if (something == null || something.get() == null) {
result = calledWhenAbsent.call();
internalCache.put(key, new _____________<V>(result));
@lukasz-zak
lukasz-zak / index.html
Created July 28, 2013 05:35
A CodePen by Łukasz Żak. Rubik's Cube in CSS3 - Rubik's Cube made in CSS3 and HTML with JavaScript code for rotation and animation.
<div id="main">
<div class="lvl lvl1">
<div class="row row1">
<div class="cube col col1">
<div></div><div></div><div></div><div></div><div></div><div></div>
</div>
<div class="cube col col2">
<div></div><div></div><div></div><div></div><div></div><div></div>
</div>