Skip to content

Instantly share code, notes, and snippets.

@smalljam
smalljam / out
Created October 20, 2015 16:33
leaderboard solution time for 1 solution
[ { language: 'csharp', key: 'hodysh', time: 455 },
{ language: 'javascript', key: 'iatsenko', time: 823 },
{ language: 'java', key: 'tverdokhlib', time: 875 },
{ language: 'java', key: 'cherkas', time: 1275 },
{ language: 'javascript', key: 'sikora', time: 6227 },
{ language: 'python', key: 'holubets', time: 6609 },
{ language: 'javascript', key: 'martynov', time: 6922 },
{ language: 'python', key: 'denys', time: 16226 },
{ language: 'javascript', key: 'blazhivsky', time: 16230 } ]
[
{
"keys": ["super+alt+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.6, 0.8, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
}
@smalljam
smalljam / test.js
Created August 19, 2015 09:34
xlsx library patch, so we can make bold cells and align them to the right
var XLSX = require('xlsx')
function Workbook() {
this.SheetNames = ['Report'];
this.Sheets = {};
}
var wb = new Workbook();
var ws = {
Introduction #1 (2 x 45)
About this course (45)
Frontend engineering introduction (45)
- web development is
- history
- current situation
- languages and platforms
- FE definition
- Job specific
- knowledge areas
@smalljam
smalljam / keybindings
Created February 18, 2013 08:42
sublime config
[
{
"keys": ["super+control+r"],
"command": "http_requester"
},
{
"command": "set_layout",
"keys": ["super+alt+6"],
"caption" : "1-2 Grid",
"args":
["Paris, France","Istanbul, Turkey","London, England","Rome, Italy","Barcelona, Spain","Moscow, Russia","Amsterdam, The Netherlands","Versailles, France","Madrid, Spain","St Petersburg, Russia","Berlin, Germany","Milan, Italy","Prague, Czech Republic","Cologne, Germany","Pisa, Italy","Vienna, Austria","Brussels, Belgium","Edinburgh, Scotland","Florence, Italy","Bilbao, Spain","Venice, Italy","Windsor & Eton, England","Verona, Italy","Brighton & Hove, England","Athens, Greece","Antwerp, Belgium","Edirne, Turkey","Bursa, Turkey","Stockholm, Sweden","Rīga, Latvia","Kyiv, Ukraine","Budapest, Hungary","Helsinki, Finland","Munich, Germany","Segovia, Spain","Turin, Italy","Italy","Santiago De Compostela, Spain","Bodrum, Turkey","Copenhagen, Denmark","Germany","Lisbon, Portugal","Seville, Spain","York, England","Rotterdam, The Netherlands","Thessaloniki, Greece","Utrecht City, The Netherlands","Zaragoza, Spain","Dublin, Ireland","Stuttgart, Germany","Avignon, France","Mallorca, Spain","Dresden, Germany","Warwick, Eng
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<script>
//https://raw.github.com/dankogai/js-base64/master/base64.js
(function(a){"use strict";var b;typeof module!="undefined"&&module.exports&&(b=require("buffer").Buffer);var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=function(a){for(var b={},c=0,d=a.length;d>c;c++)b[a.charAt(c)]=c;return b}(c),e=String.fromCharCode,f=function(a){var b=a.charCodeAt(0);return 128>b?a:2048>b?e(192|b>>>6)+e(128|b&63):e(224|b>>>12&15)+e(128|b>>>6&63)+e(128|b&63)},g=function(a){return a.replace(/[^\x00-\x7F]/g,f)},h=function(a){var b=[0,2,1][a.length%3],d=a.charCodeAt(0)<<16|(a.length>1?a.charCodeAt(1):0)<<8|(a.length>2?a.charCodeAt(2):0),e=[c.charAt(d>>>18),c.charAt(d>>>12&63),b>=2?"=":c.charAt(d>>>6&63),b>=1?"=":c.charAt(d&63)];return e.join("")},i=a.btoa||function(a){return a.replace(/[\s\S]{1,3}/g,h)},j=b?function(a){return new b(a).toString("base64")}:function(a){return i(g(a))},k=function(a,b){return b?j(a).replace(/[+\/]/g,function(
@smalljam
smalljam / assertInterface.js
Created December 18, 2011 16:41
jsTestDriver assertions
function assertInterface(keys, _interface) {
keys.forEach(function(key){
assertFunction(_interface[key]);
});
}
function assertStrictInterface(keys, _interface) {
assertEquals(keys, Object.keys(_interface));
assertInterface(keys, _interface);
}
@smalljam
smalljam / Exceptions.js
Created December 17, 2011 14:35
Custom exceptions generator
(function(ns){
function createException(name) {
ns[name] = function(text) {
var r = Error.call(this, text);
r.name = name;
return r;
};
}
@smalljam
smalljam / dashboard
Created December 15, 2011 03:26
pages overview //TODO: improve
<style type="text/css">
body {
width: 200%;
height: 200%;
}
iframe {
-webkit-transform: scale(0.2);
-webkit-transform-origin: 0 0;
position: absolute;
width: 100%;