I hereby claim:
- I am rk on github.
- I am robertkosek (https://keybase.io/robertkosek) on keybase.
- I have a public key ASCescDdEoT3Hl5loRxfmGzPdeAEC0l99tw_ahzMGXolfgo
To claim this, I am signing this object:
<!DOCTYPE html> | |
<body> | |
<div id="app"></div> | |
<script type="module"> | |
import { | |
m, | |
patch, | |
/* or any other exports you want to access */ | |
} from 'https://unpkg.com/million?module'; |
<?php | |
class TransformingStream { | |
protected $input; | |
protected $output; | |
// Chunk size... | |
protected $chunkSize = 4096; |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* rename.php - A Quick and Dirty Prefix Removal Script | |
* | |
* This is a quick and dirty prefix removal script. It's meant to be customized quickly and easily, and the | |
* typical options (the pattern and desired extensions) are defined immediately below. | |
* | |
* Writting in 2019 by Robert Kosek <robert[NOSPAM]@woodst.com> | |
* |
#!/bin/bash | |
wanted=$(basename $0) | |
dir=. | |
while [[ ! -x "$dir/$wanted" ]]; do | |
if [[ "$dir" -ef "../$dir" ]]; then | |
echo "$wanted not in the current directory or any of its parents" 1>&2 | |
exit 2 | |
fi |
-- Calculates the 1st and 3rd quartiles, and the median, from a given table. | |
-- This cannot be optimized except by adding an index to the column, as MySQL | |
-- doesn't support NTILE() natively. | |
SET @temp_rows = (SELECT GROUP_CONCAT(column ORDER BY column ASC SEPARATOR ',') FROM table WHERE column IS NOT NULL); | |
SET @temp_count = (SELECT COUNT(column) FROM table WHERE column IS NOT NULL); | |
SELECT | |
(SUBSTRING_INDEX(SUBSTRING_INDEX(@temp_rows, ',', ROUND(@temp_count * 0.25 + 1)), ',', -1)) AS 'q1', | |
(SUBSTRING_INDEX(SUBSTRING_INDEX(@temp_rows, ',', ROUND(@temp_count * 0.5 + 1)), ',', -1)) AS 'median', |
<?php | |
function print_args() { | |
foreach(func_get_args() as $value) | |
echo var_dump($value) . "\n"; | |
} | |
// This will print "int(2)" | |
print_args(extract(array('key' => 'value', "bool" => false))); |
package main | |
import ( | |
"fmt" | |
cr "crypto/rand" | |
"os" | |
enc "encoding/ascii85" | |
"big" | |
) |
var http = require('http'); | |
function fib(n){ | |
if (n < 2) return 1; | |
else return fib(n-2) + fib(n-1); | |
} | |
var cached_fib = (function(){ | |
var cache = {}; | |
return function(n) { |