Skip to content

Instantly share code, notes, and snippets.

View qurben's full-sized avatar

Gerben Oolbekkink qurben

View GitHub Profile
@qurben
qurben / aoc.js
Last active December 9, 2022 13:34
Advent of Code extension as a single script
// Taken from https://github.com/jeroenheijmans/advent-of-code-charts
(() => {
const loadScript = function() {
let cache = {};
return function(src) {
return cache[src] || (cache[src] = new Promise((resolve, reject) => {
let s = document.createElement('script');
s.defer = true;
s.src = src;
s.onload = resolve;
@qurben
qurben / jar2exe.bat
Last active August 28, 2021 14:19
Convert a jar file to a self-contained windows executable. Requires you to have a JDK and NSIS installed and on the PATH. Save as .bat and drop a jar file on it to convert it.
@echo off
@REM Save as jar2exe.bat and drop a jar file on it to create a self-contained windows executable for that jar.
SET TEMP_DIR=%temp%\jar2exe
rm -rf %TEMP_DIR% || true
mkdir %TEMP_DIR%
@qurben
qurben / setup.md
Last active April 19, 2019 14:31
Running Qsym

Running Qsym on the LAVA-M corpus

Setup

This installation is done on a fresh installation of Ubuntu 16.04.

A few other dependencies are needed: virtualenv

sudo apt install virtualenv
@qurben
qurben / wsagent-debug.md
Last active February 25, 2019 10:55
Debugging Che wsagent

Debugging Che wsagent

  1. Open Che -> Workspaces -> -your workspace- -> Env Variables
  2. Add WSAGENT_DEBUG true
  3. Add WSAGENT_DEBUG_PORT 8000
  4. If the agent should suspend on start add WSAGENT_DEBUG_SUSPEND y
  5. Hit Apply

Obtaining the agent port in Docker

To quickly figure out the ip of the agent container run docker ps in the console and find the line with eclipse-che/workspace... and in that line the debug port is at 0.0.0.0:xxxxxxx->8000/tcp

@qurben
qurben / pull.sh
Last active February 26, 2019 21:11
Download the comments of a GitHub pull request as a markdown table using the GitHub API. Retrieve a token from https://github.com/settings/tokens, no scopes are required, it is only used to make the GitHub API quota 5000 reqs/h instead of 60 reqs/h.
#! /bin/bash
# Copyright 2019 Gerben Oolbekkink
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: