Skip to content

Instantly share code, notes, and snippets.

@topkecleon
topkecleon / toast.ps1
Last active March 2, 2023 20:47 — forked from dend/toast.ps1
Toast Notification in PowerShell
# Derived from https://gist.github.com/dend/5ae8a70678e3a35d02ecd39c12f99110
# Added priority parameter.
function Show-Notification {
[cmdletbinding()]
Param (
[string]
$ToastTitle,
[string]
[parameter(ValueFromPipeline)]
$ToastText,
@topkecleon
topkecleon / qtbot.lua
Last active November 27, 2023 14:12
t.me/qtbot
local token = os.getenv('qtbot_token')
local cat_api_key = os.getenv('cat_api_key') -- https://thecatapi.com/
local https = require('ssl.https')
local json = require('dkjson')
local bindings = require('bindings').set_token(token) -- https://github.com/topkecleon/bindings
local cat_api_url = 'https://api.thecatapi.com/api/images/get?format=json&type=jpg&api_key='
local offset = 0
while true do
local success, result = bindings.getUpdates{
timeout = 60,