Skip to content

Instantly share code, notes, and snippets.

View edubxb's full-sized avatar
🕶️
daemons in the shell

Eduardo Bellido Bellido edubxb

🕶️
daemons in the shell
View GitHub Profile
@edubxb
edubxb / ratbagctl "Logitech G502 X LIGHTSPEED" info
Created April 4, 2024 16:40
Logitech G502X Lightspeed ratbagctl output
sobbing-paca - Logitech G502 X LIGHTSPEED
Model: usb:046d:c098:0
Number of Buttons: 11
Number of Leds: 0
Number of Profiles: 5
Profile 0:
Name: n/a
Report Rate: 1000Hz
Resolutions:
0: 800dpi
@edubxb
edubxb / gh-get-app-token.py
Created October 16, 2023 11:39
Python script for getting a GitHub API token for an GitHub application
#!/usr/bin/env python3
## related docs: ##
## https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app
## https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation
###################
import sys
import time
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="5156", ATTR{idProduct}=="4c50", GOTO="usb_disable_autosuspend" # QVEX Lynepad
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="cb10", ATTR{idProduct}=="6356", GOTO="usb_disable_autosuspend" # Keebio Iris Keyboard
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c52b", GOTO="usb_disable_autosuspend" # Logitech Unifying Receiver
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="on" LABEL="usb_disable_autosuspend"
@edubxb
edubxb / ventoy.json
Last active September 12, 2022 22:10
Ventoy config - https://www.ventoy.net/
{
"theme": {
"gfxmode": "1920x1080",
"file": "/ventoy/theme/virtual_future/theme.txt",
"ventoy_color": "#15f4ee"
},
"menu_class": [
{
"key": "debian",
"class": "debian"
@edubxb
edubxb / worked.py
Last active May 6, 2024 20:06
timewarrior extension to track working schedule hours
#!/usr/bin/env python3
import calendar
import dataclasses
import json
import sys
from datetime import datetime, timedelta
from math import floor
TZ_OFFSET = timedelta(hours=1)
#!/bin/bash
URL=$1
if [[ ${URL} =~ ^https://.+\.work\.com.+$ ]]; then
exec firefox -P work "$URL"
elif [[ ${URL} =~ ^https://meet\.google\.com.+$ ]]; then
exec gtk-launch google-chrome "$URL"
else
exec gtk-launch firefox "$URL"
@edubxb
edubxb / haproxy.cfg
Last active September 11, 2015 14:49
HAproxy config to balance reads and writes in a Neo4j cluster (2 nodes, one arbiter)
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
@edubxb
edubxb / inireader.py
Last active August 29, 2015 14:20
Simple program to read ini files and export values
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2015 Eduardo Bellido Bellido
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@edubxb
edubxb / mailsend.py
Last active July 20, 2022 10:01
Simple program to send emails from command line
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2022 Eduardo Bellido Bellido
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#

Keybase proof

I hereby claim:

  • I am edubxb on github.
  • I am edubxb (https://keybase.io/edubxb) on keybase.
  • I have a public key whose fingerprint is 0A23 9CD1 B483 82B9 44EE 085E 1CC9 EE5C D7AC 7F4B

To claim this, I am signing this object: