Skip to content

Instantly share code, notes, and snippets.

View cvengler's full-sized avatar
🪲

cve cvengler

🪲
  • Karlsruhe, Germany
View GitHub Profile
@cvengler
cvengler / githubuser.py
Last active October 31, 2018 10:49
Download a GitHub User with all repos. Usage: python3 githubuser.py <username>
import urllib.request
import json
import sys
import os
user = sys.argv[1]
url = "https://api.github.com/users/" + user + "/repos"
urllib.request.urlretrieve(url, "json.json")
@cvengler
cvengler / README.md
Created November 1, 2018 20:23
Youtube to MP3

README

You need youtube-dl and ffmpeg.

Usage

ytmp3.sh <video url>
@cvengler
cvengler / randomcat.js
Created December 21, 2018 14:25
Display a random cat on a website using random.cat
// Create an image in HTML with the ID "catimg"
document.getElementById("catimg").style.display = "none";
function getcat() {
let rURL = "http://aws.random.cat/meow";
let r = new XMLHttpRequest();
r.open("GET", rURL);
r.responseType = "json";
r.send();
@cvengler
cvengler / signalfd.c
Created April 21, 2023 11:45
signalfd(2) alongside waitpid(2)
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/signalfd.h>
#include <sys/wait.h>
#include <err.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>