- Easily extendable for different SQL dialects (PostgreSQL/MySQL/MS-SQL/SQLLite)
- Completion should always work, also with invalid/incomplete SQL
- Use sqlparse and prompt_toolkit as much as possible, don't try to abstract either
- Prioritize suggestions, the top suggestions always should complete to valid SQL. Tab-tab-tab-tab should complete to something like select * from firsttable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for W in *.wav ; do sox -v .01 $W lowvol/$W ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM *** Pythagoras tree **** | |
SCREEN 12: REM screen 12 voor VGA | |
CLS : pi = 4 * ATN(1) | |
WINDOW (-2.5, 2)-(5.5, 5) | |
INPUT "tolerantie (kan .1 zijn) =", eps: CLS | |
p = 32: DIM xa(p), ya(p), xb(p), yb(p), s(p) | |
REM *** initialiseren **** | |
h = pi / 3'prescribed angle | |
a1 = COS(h) * COS(h): b1 = SIN(h) * COS(h) | |
a2 = SIN(h) * SIN(h): b2 = -b1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function fish() { | |
echo "#" "$@" | |
guestfish --remote -- "$@" || exit 1 | |
} | |
eval $(guestfish --listen) | |
img=grub2-usb.raw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# https://w1.fi/wpa_supplicant/devel/dbus.html | |
import dbus | |
import sys | |
if len(sys.argv) > 1: | |
interface = sys.argv[1] | |
else: | |
interface = 'wlp0s20f0u2u2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import psutil | |
import time | |
import requests | |
import lxml.html | |
print('\033c') | |
while 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import dbus | |
import tty | |
import termios | |
import sys | |
def getchar(): | |
#Returns a single character from standard input | |
fd = sys.stdin.fileno() | |
old_settings = termios.tcgetattr(fd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
if 'prompt' in sys.argv: | |
from prompt_toolkit.shortcuts import PromptSession, CompleteStyle | |
import click | |
prompt_app = PromptSession(message='>') | |
query = '' | |
while 1: | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnf install dtv-scan-tables v4l-utils | |
dvbv5-scan -o ~/.config/mpv/channels.conf -O vdr /usr/share/dvbv5/dvb-t/nl-All | |
mpv dvb://NPO\ Radio\ 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Usage: openssl rsa -in account_key.pem -text -noout | python rsapem2json.py | |
# Will convert the RSA PEM private key to the Letsencrypt/Certbot | |
# private_key.json file. | |
# | |
# Public Domain, Walter Doekes, OSSO B.V., 2016 | |
# | |
# From: | |
# -----BEGIN RSA PRIVATE KEY----- | |
# MIIJJwsdAyjCseEAtNsljpkjhk9143w//jVdsfWsdf9sffLgdsf+sefdfsgE54km |