Skip to content

Instantly share code, notes, and snippets.

@surfzoid
Last active March 7, 2023 19:12
Show Gist options
  • Save surfzoid/70725426862ffde88f5f8a136b451f21 to your computer and use it in GitHub Desktop.
Save surfzoid/70725426862ffde88f5f8a136b451f21 to your computer and use it in GitHub Desktop.
Use geany.lua to paste on termbin
In geany tool/plugin manager, enable lua pluggin
create : ~/.config/geany/plugins/geanylua/events/configure.lua
create & edit : ~/.config/geany/plugins/geanylua/termbin.lua with the folowing content:
local ok,msg = geany.launch("/home/eric/.config/geany/plugins/geanylua/totb.sh",geany.filename ())
if not ok then geany.message(msg) end
create & edit & make it executable : ~/.config/geany/plugins/geanylua/totb.sh with the folowing content:
#!/bin/bash
echo $1
firefox `/usr/bin/cat "$1"|nc termbin.com 9999`
echo $RESULT
now you will have tool/luascript/termbin after geany restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment