Skip to content

Instantly share code, notes, and snippets.

@hadess
hadess / tmp.c
Created October 5, 2013 23:19
Hack to control the keyboard backlight level on a Thinkpad Lenovo X1 Carbon Touch
/* gcc -o tmp `pkg-config --libs --cflags glib-2.0` tmp.c
*
* # modprobe ec_sys
*
* # watch -n 0.1 hexdump -C /sys/kernel/debug/ec/ec0/io
*
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 03 00 10 |..........G.....|
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 43 00 10 |..........G..C..|
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 83 00 10 |..........G.....|
@Miouyouyou
Miouyouyou / steam-idler.c
Last active September 14, 2022 16:59
SteamIdler
/* A really dumb Steam Idler in C for Linux systems.
* Might work on Mac OS too but I never tested it.
*
* /!\ You need to have Steam currently running on the computer
* ⁻⁻⁻ executing this software.
*
* Short version :
* gcc -o SteamIdler steam-idler.c libsteam_api.so
*
* Long version :
@vzaliva
vzaliva / ThinkLight
Created May 22, 2016 14:27
This script controll keyboard backlight on IBM ThinkPad X-series
#!/bin/bash
# Vadim Zaliva lord@crocodile.org
# based on https://gist.github.com/hadess/6847281
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@Frooxius
Frooxius / ModelExporter.cs
Created July 8, 2018 22:26
Model Exporter
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Assimp;
using Assimp.Configs;
using System.IO;
using BaseX;
namespace FrooxEngine