Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
api_url=http://localhost:3001
# TODO jinja template api url?
# TODO nice readme
# TODO auth option
if [ $(curl -o /dev/null -w '%{http_code}\n' -s -I $api_url) != 200 ]
then
echo no connection to "$api_url"
@phuntik
phuntik / calendar
Last active September 5, 2024 13:08
i3blocks notify-send calendar
#! /bin/bash
# dunstctl set-paused false
send_current() {
TODAY=$(date '+%-d')
month=$(ncal -bhMw)
BODY=$( tail -n7 <<< $month | sed "s/| /▕ /" | sed -z "s/ \($TODAY\) /<span bgcolor='white' color='black'> \1 <\/span>/1" | sed "s/\(.*\)\(.\{8\}\)$/\1<span color='IndianRed'>\2<\/span>/")
HEAD=$(echo "$month" | head -n1)
notify-send -a 'calendar' \
import requests
import json
import datetime
from clickhouse_http_client import ClickHouse
# define variables
ch = ClickHouse(user="moira",password="moira",database="moira")
moira_url="http://localhost:3002"
# get active alarms list