Skip to content

Instantly share code, notes, and snippets.

View voidbert's full-sized avatar
🏗️
Knowledge under construction

Humberto Gomes voidbert

🏗️
Knowledge under construction
  • UMinho & INESC TEC
  • Braga, Portugal
View GitHub Profile
@voidbert
voidbert / eduroam.sh
Created February 7, 2024 16:54
Connecting to eduroam (UMinho) using nmcli
#!/bin/sh
nmcli con add \
type wifi \
con-name "eduroam" \
ifname "XXXXXXXXX" \ # Replace with interface name
ssid "eduroam" \
wifi-sec.key-mgmt "wpa-eap" \
802-1x.identity "aXXXXXX@alunos.uminho.pt" \
# 802-1x.password "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ # must actually be password file
@voidbert
voidbert / pi.c
Last active November 27, 2023 11:50
Calculate Pi with Monte Carlo and SIMD
/**
* I tried to calculate pi using Monte Carlo's method. It proved to be a very inefficient way to do it, but I loved
* the experience of writing SIMD intrinsics for the first time!
*
* This method is not ideal for various reasons:
*
* - Monte Carlo's method is, though technically not brute-force, slow. Trying a very large sample of points is a
* lengthier process than calculating a series up to a given number of terms, which will likely converge to pi
* faster than this method.
*
@voidbert
voidbert / ossum.sh
Last active February 13, 2024 00:15
Termux script for getting the QR code to eat at UMinho's cafeterias
#!/bin/sh
#!/data/data/com.termux/files/usr/bin/sh
# \
# \_ Choose the correct shebang depending on whether you use Termux or a
# regular Linux system.
# ----------------------------------- ABOUT -----------------------------------
#
# Script to automatically download the QR code used to eat at UMinho's
# cafeterias, avoiding the (absolutely) proprietary app.
0
20
21
22
23
43
80
81
110
143
@voidbert
voidbert / glGameOfLife.html
Last active June 30, 2023 21:03
WebGL (GPU compute) Game of Life
<!DOCTYPE html>
<html>
<head>
<style>
#canvas {
position: absolute;
top: 0px; left: 0px;
}
</style>
<script src="shaders.js"></script>
@voidbert
voidbert / Collatz.circ
Last active March 7, 2023 23:27
Hardware implementation of a Collatz Conjecture convergence checker (logisim-evolution)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="3.8.0" version="1.0">
This file is intended to be loaded by Logisim-evolution v3.8.0(https://github.com/logisim-evolution/).
<lib desc="#Wiring" name="0">
<tool name="Splitter">
<a name="appear" val="right"/>
<a name="facing" val="north"/>
</tool>
<tool name="Pin">