Skip to content

Instantly share code, notes, and snippets.

@kraklin
kraklin / parser.mjs
Created August 12, 2023 08:15
testing performance
var U_ = Object.defineProperty;
var k_ = (e, t, u) => t in e ? U_(e, t, { enumerable: !0, configurable: !0, writable: !0, value: u }) : e[t] = u;
var L = (e, t, u) => (k_(e, typeof t != "symbol" ? t + "" : t, u), u);
var $t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ci = { exports: {} };
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@kraklin
kraklin / download_curl.js
Last active August 10, 2021 09:30
Test the cURL download from JS script
const fs = require('fs');
const { spawn } = require('child_process');
const path = require('path');
const download_file = (file_url) => {
// create url and filename variables
const url = new URL(file_url);
const fileName = url.pathname.split('/').pop();
@kraklin
kraklin / BenchmarkPattern.elm
Last active April 2, 2019 09:37
Benchmark of pattern matching vs. List.indexedMap
module BenchmarkPattern exposing (main)
import Benchmark exposing (..)
import Benchmark.Runner exposing (BenchmarkProgram, program)
main : BenchmarkProgram
main =
program suite

Keybase proof

I hereby claim:

  • I am kraklin on github.
  • I am tomaslatal (https://keybase.io/tomaslatal) on keybase.
  • I have a public key ASB-cXNF9E7oYhmo6CHIQVUbkv63tnSixsDN5c8ihPR8VQo

To claim this, I am signing this object:

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugins (Vundle)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
getCoordsForPosition position =
-- first quadrant
if List.member position [1..5] then
{ x = (9 * position - 4.5), y = 41 }
else if List.member position [6..9] then
{ x = 40.5, y = 41 - (position - 5) * 9 }
else if position == 10 then
{ x = 49.5, y = 5 }
-- second quadrant
else if List.member position [11..15] then
@kraklin
kraklin / gist:9de9ca74045ebbec7d5a
Last active August 29, 2015 14:20
First-28-talks-on-Barcamp-Brno oneliner highlighter
for(var i=0; i <28; i++){var nodes = document.querySelectorAll("table"); nodes[nodes.length -1].rows[i].style.backgroundColor="#eeffee";}