Skip to content

Instantly share code, notes, and snippets.

View bluecube's full-sized avatar

Kuba Marek bluecube

  • Mosaic 51
  • Prague, Czech Republic
View GitHub Profile
@bluecube
bluecube / regex_plot.py
Last active June 30, 2022 16:36
Small script for plotting graphs from text logs
#!/usr/bin/env python3
import re
import sys
import argparse
import datetime
import matplotlib.pyplot as plt
@bluecube
bluecube / script.js
Last active October 27, 2021 02:40
Userscript: Piratebay Transmission button
// ==UserScript==
// @name Piratebay Transmission button
// @version 1
// @grant none
// @match https://*.thepiratebay.org/*
// ==/UserScript==
function transmission_request(data, sessionId) {
return fetch(
@bluecube
bluecube / noise.py
Last active May 8, 2018 11:28
Remix of some ideas of perlin noise and simplex noise...
import math
import numpy
_permutation = numpy.array([ 6, 36, 184, 45, 107, 67, 2, 34, 82, 181, 110, 188, 69, 152, 142, 0,
224, 154, 236, 203, 157, 73, 171, 115, 138, 66, 252, 165, 155, 60, 229, 95,
141, 202, 58, 132, 76, 94, 160, 53, 170, 242, 235, 81, 139, 84, 240, 153,
130, 148, 228, 97, 105, 201, 135, 237, 62, 232, 163, 136, 143, 255, 147, 178,
204, 127, 227, 249, 253, 77, 145, 91, 19, 72, 24, 108, 144, 233, 101, 40,
20, 37, 200, 29, 54, 27, 55, 46, 234, 50, 213, 64, 17, 231, 25, 10,
70, 146, 205, 222, 80, 162, 59, 86, 12, 125, 192, 124, 246, 83, 114, 93,
@bluecube
bluecube / XClipboard.cpp
Created March 28, 2014 15:50
Clipboard under X11
#include "Agui/Clipboard/XClipboard.hpp"
#include <X11/Xatom.h>
#include <stdio.h>
#include <sys/select.h>
#include <unistd.h>
#include <assert.h>
#include <algorithm>
#include <iostream>
// Most of the code here is adapted from the example at