Skip to content

Instantly share code, notes, and snippets.

View benalb's full-sized avatar

Benjamín Albiñana benalb

View GitHub Profile
@brummer10
brummer10 / guitarix_presets.py
Last active October 29, 2023 10:19
Demoing how to switch presets via the rpc spcket
#! /usr/bin/python3
# -*- coding: utf-8 -*-
guitarix_pgm = "guitarix -N -p 7000"
import socket, json, os, time, signal
import sys, tty, termios
from subprocess import check_output
class _Getch:
@cellularmitosis
cellularmitosis / README.md
Last active April 26, 2024 06:45
Quick-n-dirty QEMU script to spin up Debian on various CPU's
@IanColdwater
IanColdwater / twittermute.txt
Last active November 17, 2024 02:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@MarcosBL
MarcosBL / fuck.py
Created September 24, 2019 23:35
Fuck you deleting Telegram messages after minutes
# NO SIRVE DE NADA BORRAR TU HISTORIAL, seguirá en el canal 48 horas
# disponible para cualquiera que quiera recuperarlo :P
from telethon import TelegramClient, events, sync
from telethon.tl.types import InputChannel, PeerChannel
from telethon.tl.types import Channel
import time
api_id = 'XXXXXX'
api_hash = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
import datetime
from telethon import TelegramClient
api_id = 123456789
api_hash = 'abcdef123456789'
client = TelegramClient('session_name', api_id, api_hash)
client.session.report_errors = True
client.start()
@MarcosBL
MarcosBL / wp-utd.sh
Created September 10, 2019 16:32
Keep Wordpress Up to Date
#!/bin/bash
#
# WP-UTD
# WordPress Up To Date 0.1, May 25 2012
# by Marcos BL; No license, feel free use it
#
# WP-UTD checks all your local WordPress installations are
# up-to-date and notifies you by email if a new version
# is available.
#
@ArtBIT
ArtBIT / glados.sh
Last active April 13, 2021 17:12
GLaDOS eSpeak
random_pitch() {
local delta=${1:-50}
local value=$(( ($RANDOM % $delta) - $delta/2 ))
echo "+${value}" | sed 's/+-/-/'
}
glados() {
local pitch=70
local speed=180
local lang=en
@shawwwn
shawwwn / uping.py
Last active October 10, 2024 20:02
µPing: Ping library for MicroPython
# µPing (MicroPing) for MicroPython
# copyright (c) 2018 Shawwwn <[email protected]>
# License: MIT
# Internet Checksum Algorithm
# Author: Olav Morken
# https://github.com/olavmrk/python-ping/blob/master/ping.py
# @data: bytes
def checksum(data):
if len(data) & 0x1: # Odd number of bytes
# Voidlinux PR guide
## Useful hints
> Use just one commit per PR
### Correct a wrong commit
```
$ git commit --amend
```
@fbrinker
fbrinker / i3-display-swap.sh
Last active March 6, 2024 11:09
Swap i3 displays / workspaces between displays
#!/usr/bin/env bash
# requires jq
DISPLAY_CONFIG=($(i3-msg -t get_outputs | jq -r '.[]|"\(.name):\(.current_workspace)"'))
for ROW in "${DISPLAY_CONFIG[@]}"
do
IFS=':'
read -ra CONFIG <<< "${ROW}"
if [ "${CONFIG[0]}" != "null" ] && [ "${CONFIG[1]}" != "null" ]; then