Skip to content

Instantly share code, notes, and snippets.

View lenerd's full-sized avatar

Lennart Braun lenerd

  • Aarhus, Denmark
View GitHub Profile
@lenerd
lenerd / LICENSE
Last active April 4, 2021 11:38
x86-64 assembly for computing the length of a number's Collatz sequence
MIT License
Copyright (c) 2021 Lennart Braun
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:
@lenerd
lenerd / Meepwn CTF Quals 2018: babysandbox
Created July 19, 2018 18:16
Meepwn CTF Quals 2018: babysandbox
Exploit for the babysandbox challenge of Meepwn CTF Quals 2018
@lenerd
lenerd / VolgaCTF 2018 Quals
Last active March 25, 2018 16:30
VolgaCTF 2018 Quals
Scripts solving two crypto challenges from VolgaCTF 2018 Quals
#!/bin/sh
elf="$(mktemp)"
bin="$(mktemp)"
(echo ".intel_syntax noprefix"; cat "$1") | gcc -x assembler -m32 -masm=intel -c -o "$elf" -
objcopy -O binary --only-section=.text "$elf" "$bin"
echo -e "Assembly:\n"
@lenerd
lenerd / randr.py
Created August 20, 2015 13:52
Changes between xrandr scripts.
#!/usr/bin/env python3
"""
Simple program to execute scripts from a given set one after another.
Written to easily change between xrandr configurations.
Point SCRIPT_DIR to the location of the scripts to be executed.
The name of the last executed script will be saved in SCRIPT_DIR/current.
With each call this program executes the next scripts in alphabetical order,
until one exits successfully (returns 0).
@lenerd
lenerd / dir_diff.sh
Last active August 29, 2015 14:20
Compares the content of two directories.
#!/bin/sh
# ==============================================================================
# name: dir_diff.sh
# description: Compares the content of two directories.
# author: Lennart Braun <lenerd@posteo.de>
# license: MIT
# date: 20150501
# version: 0.1
# requirements: sha1sum
# usage: sh dir_diff.sh dir1 dir2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simple script to control your notebooks backlight.
"""
"""
The MIT License (MIT)
#!/bin/sh
# Author: Lennart Braun <lenerd@posteo.de>
# This file is released into Public Domain.
# Idea: https://xkcd.com/196/
# Requires: xautomation
while true
do
xte 'mousermove 0 -1'