Skip to content

Instantly share code, notes, and snippets.

@vor0nwe
vor0nwe / clip
Last active September 13, 2023 14:59
clip: WSL bash script to access the Windows Clipboard (both read and write)
#!/bin/bash
[[ ! -t 1 ]] && powershell.exe Get-Clipboard
[[ ! -t 0 ]] && clip.exe
if [[ -t 1 && -t 0 ]]; then
echo Nothing specified to copy or paste! >&2
exit 1
fi
@vor0nwe
vor0nwe / transmission-torrent-done.sh
Last active July 23, 2022 19:43
Send a PushBullet notification when Transmission has finished a download.
#!/bin/bash
curl -u YOUR_ACCESS_TOKEN: \
-X POST https://api.pushbullet.com/v2/pushes \
--header 'Content-Type: application/json' \
--data-binary "{\"type\":\"note\",\"title\":\"Downloaded\",\"body\":\"$TR_TORRENT_NAME: $TR_TIME_LOCALTIME\"}"
#
# Get YOUR_ACCESS_TOKEN from your account page at https://www.pushbullet.com/account
#
@vor0nwe
vor0nwe / md5.js
Created March 1, 2014 20:07 — forked from PixnBits/md5.js
/*
* http://www.myersdaily.org/joseph/javascript/md5-text.html
*/
(function (global) {
var md5cycle = function (x, k) {
var a = x[0],
b = x[1],
c = x[2],
d = x[3];