Skip to content

Instantly share code, notes, and snippets.

View Tethik's full-sized avatar
👾
Up to no good

Joakim Uddholm Tethik

👾
Up to no good
View GitHub Profile
---------------------------------------------------------------------------------------------------- benchmark: 32 tests -----------------------------------------------------------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers(*) Rounds Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_saffron_list_re_first (0006) 13.8283 (1.0) 54.1210 (1.0) 15.3642 (1.0) 2.0998 (1.0) 15.0204 (1.0) 0.0000 (1.0) 1462;13200 35485 1
test_benchmark_saffron_list_re_first (NOW) 13.8283 (1.0) 105.1426 (1.94) 16.3483 (1.06) 4.07
@Tethik
Tethik / gist:4c74080933d8f2c59c7cf62f02795b3a
Last active December 8, 2016 14:52
parsel benchmark rerun
------------------------------------------------------------------------------------------------------ benchmark: 32 tests ------------------------------------------------------------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers(*) Rounds Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_parsel_list_re_first (NOW) 0.0000 (1.0) 244.1406 (1.65) 17.8801 (1.0) 3.8733 (1.0) 16.9277 (1.06) 0.9537 (1.0) 4050;4796 80660 1
test_benchmark_parsel_list_re_named_first (NOW) 1.1921 (inf) 212.1925 (1.44) 19.1280 (1.07)
@Tethik
Tethik / gist:8885c5c349c8922467b31a22078baf48
Created August 18, 2016 15:58
Parsel benchmarking log for regex improvements
----------------------------------------------------------------------------------------------------- benchmark: 32 tests ------------------------------------------------------------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers(*) Rounds Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_saffron_list_re_first (NOW) 12.8010 (1.0) 96.0710 (1.93) 13.9891 (1.0) 2.3199 (1.92) 13.3010 (1.0) 0.4190 (2.17) 8664;13288 115199 1
test_benchmark_parsel_list_re_named_first (NOW) 13.8710 (1.08) 1,102.4150 (22.16) 15.5388 (1.11)
@Tethik
Tethik / readFiles.js
Created February 25, 2016 19:27
HTML5 read files.
function readFiles(e) {
// Clear old files
files = [];
// var reader = new FileReader();
// reader.onload = function(e) {
// var contents = e.target.result;
// files.push({ filename: file.name, binary: btoa(contents) });
// };
@Tethik
Tethik / Main.java
Created January 30, 2016 20:56
Basic client/server tcp example.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;
public class Main implements Runnable {
router.get('/:name/tpl', function(req, res, next) {
var fileName = req.params.name + ".html";
var options = {
root: __dirname + '/public/',
dotfiles: 'deny',
};
res.sendfile(fileName, options, function (err) {
if (err) {

Keybase proof

I hereby claim:

  • I am Tethik on github.
  • I am tethik (https://keybase.io/tethik) on keybase.
  • I have a public key whose fingerprint is F6FA 724C A019 7D73 88C0 2211 54E3 CB53 BD1A 5FAE

To claim this, I am signing this object:

@Tethik
Tethik / comb.py
Last active August 29, 2015 14:06
Random Tumblr Request.
import sys
list1, list2 = [],[]
for line in sys.stdin:
line = line.strip()
if line == "":
break
parts = line.split(" ")
list1.append(parts[0])
if len(parts) > 1:
@Tethik
Tethik / gist:3ae7e1c188c4503bf5c0
Last active August 29, 2015 14:03
AngularJS Autoresizing iframe
if (parent && window.frameElement)
$interval(function () {
window.frameElement.style.height = (document.body.offsetHeight + 60) + "px";
}, 10);
@Tethik
Tethik / portscan.py
Created May 2, 2014 12:54
Basic tcp portscan script.
import socket
import threading
from queue import Queue
def is_open(host, port):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(0.5)
try:
s.connect((host, port))
s.close()