Skip to content

Instantly share code, notes, and snippets.

@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 / prowl.sh
Created April 9, 2011 13:09
send prowl push notifications to your iOS device; requires curl -> for debian based distros # apt-get update && apt-get install curl -y
#! /bin/sh
# Usage: ./prowl.sh priority(-2 to 2) app event description
# Example: ./prowl.sh 0 "transmission" "torrent has finished" "Coen Brothers Compilation has finised downloading"
priority=$1
app=$2
event=$3
description=$4
apikey=fill_in_your_API_key_here
if [ $# -ne 4 ]; then
@koma5
koma5 / gist:f1a485a0aa45fea990a3fb46a865002b
Created January 7, 2017 16:08
keep your Browser busy forever by opening data url.
data:text/html,<script>for(;0<1;){}</script>
# obscured with base64
data:text/html;charset=utf-8;base64,PHNjcmlwdD5mb3IoOzA8MTspIHt9PC9zY3JpcHQ+Cg==
@koma5
koma5 / delete-utf8-bom.vbs
Created February 24, 2012 09:45
this script removes the UTF-8 BOM "" 0xEFBBBF from the beginning of a file / just drag and drop a file on this script
Option Explicit
Const UTF8_BOM = ""
Const ForReading = 1
Const ForWriting = 2
Dim fso
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
@koma5
koma5 / backup.bat
Created May 18, 2012 11:39
automated mysql dumps on windows - dumps all dbs which user sees
set MYSQLUSER=username
set MYSQLPASS=password
set BATCHFILE=C:\Temp\auto_built_sql_dump.bat
set DUMPPATH=Z:\
set DRIVE=Z:
net use %DRIVE% \\somehost\some\networkdrive /user:domain\user password
rem building time stamp
set tmp_time=%time:~-11,2%.%time:~-8,2%.%time:~-5,2%
@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 / 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.