Skip to content

Instantly share code, notes, and snippets.

View rdig's full-sized avatar

Raul rdig

View GitHub Profile
@rschroll
rschroll / setinput.sh
Created August 10, 2021 03:25
Wacom Tablet to Window Mapping
#!/bin/bash
# Map the tablet to cover a particular window, while maintaining its aspect
# ratio. If run from the terminal, it allows the user to click on the window
# for mapping. Otherwise, use the currently focused window. Should the
# window aspect ratio not match the tablet aspect ratio, the tablet will
# cover an additional area of the screen, to maintain the correct aspect
# ratio. By default, the window will be aligned with the top-left corner
# of the tablet, but options adjust the horizontal (-l, -c, -r) and vertical
# (-t, -m, -b) alignment.
@grahamwhaley
grahamwhaley / sdrsharp.png
Last active June 10, 2025 22:33
Running SDR# under Linux/wine
sdrsharp.png
@pubkey
pubkey / Mad_Catz_linux.bash
Last active December 9, 2024 12:29
Mad Catz R.A.T. 7/9 on Linux ubuntu/mint
#The mouse will suck on linux because of the programmable buttons.
#This script will change the button-delegation so that the mouse doesn't stuck.
#@link https://community.linuxmint.com/hardware/view/10217
sudo mkdir /etc/X11/xorg.conf.d
sudo rm /etc/X11/xorg.conf.d/910-rat.conf
# add the following to the file
echo "Section \"InputClass\"" >> /etc/X11/xorg.conf.d/910-rat.conf
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@ninjascribble
ninjascribble / node-user-agent.js
Last active September 30, 2024 22:28
Fetching the user-agent string from a request using either NodeJS or NodeJS + Express
/** Native NodeJS */
var http = require('http')
, server = http.createServer(function(req) {
console.log(req.headers['user-agent']);
});
server.listen(3000, 'localhost');
/** NodeJS with Express */
var express = require('express')
@dex4er
dex4er / eToken-9.sh
Last active April 16, 2025 22:00
eToken
# udev
wget https://gist.githubusercontent.com/dex4er/1354710/raw/0f9738c7439cdfb9e4446663d137f91ee153b4d8/etc_udev_rules.d_90-hid-eToken.rules
sudo cp etc_udev_rules.d_90-hid-eToken.rules /etc/udev/rules.d
sudo service udev reload
# required packages
sudo apt-get -yy install pcscd opensc
# legacy library
wget http://mirrors.kernel.org/ubuntu/pool/universe/h/hal/libhal1_0.5.14-8_amd64.deb