Skip to content

Instantly share code, notes, and snippets.

@koma5
koma5 / sbb_auto_insert.js
Last active November 7, 2017 16:42
auto insert "3052 Zollikofen, Webergutstrasse 12" in from field on sbb website.
// ==UserScript==
// @name sbb auto insert
// @namespace https://www.sbb.ch/
// @version 0.1
// @description insert "3052 Zollikofen, Webergutstrasse 12"
// @author koma5
// @match https://www.sbb.ch/*
// @grant none
// @downloadURL https://gist.githubusercontent.com/koma5/bd585a9d9f6f74e6b32c14c45cfccbc2/raw/sbb_auto_insert.js
// @updateURL https://gist.githubusercontent.com/koma5/bd585a9d9f6f74e6b32c14c45cfccbc2/raw/sbb_auto_insert.js
@koma5
koma5 / lichess_notifier.ipynb
Created November 7, 2017 07:08
stealthy nofifications when I have to move next in my current lichess.org games.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@koma5
koma5 / change_unit_of_balance_freebitco.in.js
Last active July 2, 2022 19:59
tampermonkey script to change unit of balance on freebitco.in
// ==UserScript==
// @name change unit of balance on freebitco.in
// @namespace http://5th.ch/
// @version 0.5
// @description change unit of balance on freebitco.in
// @author @koma5
// @match https://freebitco.in/*
// @grant none
// @downloadURL https://gist.githubusercontent.com/koma5/4eccd9251d5874d454a197958e78135c/raw/change_unit_of_balance_freebitco.in.js
// @updateURL https://gist.githubusercontent.com/koma5/4eccd9251d5874d454a197958e78135c/raw/change_unit_of_balance_freebitco.in.js
@koma5
koma5 / prowlPushIfTankFullMqtt.sh
Last active March 12, 2017 18:33
lazy bash script to push to iPhone with prowl if 'tank full' on the mqtt topic 'vw/dehum/state'
mosquitto_sub -h mqtt -t 'vw/dehum/state' |
grep --line-buffered "tank full" |
xargs -d '\n' -n1 -I % curl -X POST --data 'apikey=<apikey>&event=%&application=vw/dehum' https://api.prowlapp.com/publicapi/add
@koma5
koma5 / 5thli_linkGone_delete.sql
Last active February 1, 2017 23:06
5th.li deleting #linkGone links to implement
# select urls / #linkGone links which werent accesed since 5 years
SELECT * FROM (
SELECT log.shorturl, MAX(log.click_time) AS most_recent_click_time
FROM yourls_log as log
INNER JOIN yourls_url as url
ON log.shorturl=url.keyword
WHERE url.title = 'http://5th.li/#linkGone'
GROUP BY log.shorturl
) AS sub
WHERE sub.most_recent_click_time < DATE(NOW()) - INTERVAL 5 YEAR
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
http://www.tldp.org/HOWTO/PPP-HOWTO/direct.html
sudo pppd -detach crtscts lock defaultroute 10.42.42.41:10.42.42.42 /dev/cu.usbserial-A9014CRC 57600
sudo pppd -detach crtscts lock proxyarp 10.42.42.41:10.42.42.42 /dev/cu.usbserial-AM026521 57600 debug
##
http://elinux.org/RPi_Serial_Connection