Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "usage: $0 [domain]"
exit 1
fi
source /root/.acme.sh/acme.sh.env
#!/bin/sh
set -e
# Assuming following config in HAproxy:
#
# acl letsencrypt-acl path_beg /.well-known/acme-challenge/
# use_backend letsencrypt-backend if letsencrypt-acl
# backend letsencrypt-backend
# server letsencrypt 127.0.0.1:8888
DEPLOY_HAPROXY_RELOAD="/etc/init.d/haproxy reload"
#!/usr/bin/env python
import sys
import json
import datetime
# Feed me with output of:
# ffprobe -f lavfi -i movie=INPUT.mov,ocr -show_entries frame=pkt_dts_time:frame_tags=lavfi.ocr.text -of json
input= sys.argv[1]
id = 0
old_time = '00:00:00,000'
@jonassvatos
jonassvatos / turbovnc-with-soud.sh
Last active February 17, 2022 17:35
Connect to TurboVNC server with sound over PulseAudio
#!/bin/bash
set -e
# Assuming VNC listens on :5911 and you have following in .vnc/xstartup.turbovnc or .profile :
# export PULSE_SERVER=127.0.0.1:4714
if [[ $# -eq 0 ]] ; then
ANSWER=$(zenity --forms --forms --title="Connect to VNC with sound" --text="Enter credentials" --add-entry="Hostname" --add-entry="Username")
HN=$(echo $ANSWER | cut -d '|' -f1)
UN=$(echo $ANSWER | cut -d '|' -f2)
ARGS="${HN} -l${UN}"
#!/usr/bin/env python3
import csv
import requests
import json
import os
import sys
def elastic(name, director, year):
payload = {
"_source": "FILMID",
#!/bin/env python
import numpy as np
import wavio
a = wavio.read('track1.wav')
b = wavio.read('track2.wav')
c = np.subtract(a.data, b.data)
wavio.write('difference.wav', c, 48000, sampwidth=3)

Keybase proof

I hereby claim:

  • I am lsde on github.
  • I am lsde (https://keybase.io/lsde) on keybase.
  • I have a public key whose fingerprint is 1608 FBBC 3714 2E69 AA46 E3C5 C4E3 B91C 4352 5F55

To claim this, I am signing this object: