Skip to content

Instantly share code, notes, and snippets.

View redraw's full-sized avatar

Agustin Bacigalup V redraw

  • 02:57 (UTC -03:00)
View GitHub Profile
#!/usr/bin/liquidsoap -v
set("log.stdout", true)
interim = single("~/Música/interim.mp3")
himno = single("~/Música/himno.mp3")
temas = playlist("~/Música/playlist")
radio = random(weights=[1,3], [interim, temas])
radio = add([radio, switch([({0m0s}, himno)])])
@redraw
redraw / notify-iss.sh
Last active May 8, 2020 02:49
dirty desktop script to notify iss
#/bin/sh
date_from_ts () { date --date=@$1 +'%H:%M %D'; }
passes=$(http "satellites.fly.dev/passes/25544" lat=="-34.1234" lon=="-57.1234" | jq ".[] | select(.visible) | .start.timestamp")
for timestamp in $passes; do
echo "notify-send -u normal 'ISS arriba!'" | at "$(date_from_ts $timestamp)"
done
echo "$(realpath $0)" | at "$([ ! -z $timestamp ] && echo "$(date_from_ts $timestamp)" || echo "now + 1 day")"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@redraw
redraw / googlefit.ipynb
Last active April 19, 2021 01:53
my google fit records in covid time
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
inotify(watch/wait) -- inotify tools to monitor file changes
wrk -- stress http server test
sendmidi/receivemidi -- midi tools
ipcalc -- calculate network hosts ranges
pup -- parse DOM
pyp -- pipe to python
qrcp -- transfer files scanning qr
gotty -- share tty
zerotier -- free tunnel / private LAN mesh network
castnow -- cast media to chromecast
#!/bin/bash
# sudo apt install jq wget curl
# usage: github-install user/repo
set -e
repo=$1
tmp="/tmp/.github-install"
binpath="$HOME/.local/bin"
rm -rf $tmp
@redraw
redraw / 10-hibernate.conf
Created January 15, 2021 21:30
hibernate kde neon
# particion swap size = ram
# gettear UUID con blkid
# en /etc/grub/default agregar,
# quiet splash resume=UUID=<UUID-swap-partition>
# sudo update-grub
# sudo vim /etc/polkit-1/localauthority.conf.d/10-hibernate.conf
[Re-enable hibernate by default for login1]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
@redraw
redraw / thinkpad-hotkeys
Last active January 25, 2021 01:08
Thinkpad T14 ACPI event/action hotkey
# /etc/acpi/events/thinkpad-hotkeys
event=ibm/hotkey
action=/etc/acpi/thinkpad-hotkeys.sh %e
@redraw
redraw / gist:f94756a2e2d9627d5af33731162b2d81
Last active March 5, 2021 23:02
el sr @ignaciovidal nos dejo manijas para repasar como funcionaba la herencia multiple en Python
>>> class A():
...: def uno(self):
...: print("A uno")
>>> class B():
...: def uno(self):
...: print("B uno")
...: def dos(self):
...: print("B dos")
...:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.