Skip to content

Instantly share code, notes, and snippets.

View KKrisu's full-sized avatar
💭
Saving the world, please don't disturb

Kris Kesy KKrisu

💭
Saving the world, please don't disturb
  • Gniezno, Poland
View GitHub Profile
@KKrisu
KKrisu / object_literal.js
Created May 12, 2016 19:52
Object literal ES6
parent.console.clear();
// var {a, b} = {a: 1, b: 2};
var a = 1;
var b = 2;
// console.log(a, b);
var bar = 'test';
@KKrisu
KKrisu / promises.js
Created May 12, 2016 19:54
ES6 Promises
parent.console.clear();
function asyncFunction(id = '', delay = 1000) {
return new Promise((resolve, reject) => {
setTimeout(() => {
// resolve('yeah ' + id);
reject('nooo ' + id);
}, delay);
});
}
@KKrisu
KKrisu / maps_sets.js
Created May 12, 2016 19:55
ES6 Maps & Sets
parent.console.clear();
let o1 = {a: 1};
let o2 = {a: 1};
let o = {};
o[34] = 'a';
o['34'] = 'a';
o[o1] = 'b';
o[o2] = 'c';
@KKrisu
KKrisu / keybindings.json
Created November 20, 2017 20:45
VS Code settings
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+e", "command": "editor.action.deleteLines",
"when": "editorTextFocus && !editorReadonly" },
{ "key": "alt+up", "command": "editor.action.insertCursorAbove",
"when": "editorTextFocus" },
{ "key": "alt+down", "command": "editor.action.insertCursorBelow",
"when": "editorTextFocus" },
{ "key": "alt+shift+up", "command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly" },