This file contains hidden or 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
version: "3.2" | |
ervices: | |
transmission: | |
image: haugene/transmission-openvpn:latest | |
hostname: docker-transmission-openvpn | |
restart: unless-stopped | |
volumes: | |
- '/your-data-directory-on-host/media/transmission:/data' | |
- '/your-data-directory-on-host/config/transmission:/config' | |
- '/etc/localtime:/etc/localtime:ro' |
This file contains hidden or 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
def get_wires(possibilities, of_length, after_removing, is_strict_subset=False): | |
found = list(wires for wires in possibilities if len(wires - after_removing) == of_length) | |
if is_strict_subset: | |
found = list(wires for wires in found if len(after_removing - wires) == 0) | |
possibilities.remove(found[0]) # remove from future consideration | |
return found[0] | |
def decipher_samples(samples): | |
""" |
This file contains hidden or 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 | |
# One can not currently un-share shared items to an organization in Bitwarden. | |
# | |
# A workaround is to copy them back to yourself, and then remove them from the organization. | |
# | |
# Here's a simple, dumb script that creates a personal folder, and copies org items to it. | |
# | |
# You need the bitwarden command-line (CLI) tool, and to have previously run "bw login" |
This file contains hidden or 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 | |
from collections import namedtuple | |
Trip = namedtuple("Trip", "name expenses lodgingcost bagcost") | |
def prompt(message): | |
return input(message + " => ").strip() |
This file contains hidden or 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 | |
""":" | |
# Run a pulseaudio wrapper. Fancy ugly hack. | |
exec padsp -d python3 "$0" "$@" | |
""" | |
import struct | |
import numpy | |
from scipy import signal |
This file contains hidden or 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 | |
from urllib import request, error as urlliberror | |
from bs4 import BeautifulSoup as BS | |
import multiprocessing | |
from contextlib import suppress | |
def get_title(url): | |
with suppress(urlliberror.HTTPError): | |
page = request.urlopen(url) |
This file contains hidden or 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
xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "Synaptics Tap Time" 0 | |
xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "Synaptics Palm Detection" 1 | |
xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "Synaptics Click Action" 1 3 2 | |
xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "Synaptics Scrolling Distance" -27 -27 | |
height=$((680-1)) | |
width=$((1216-1)) | |
to_edge=0 | |
xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "Synaptics Soft Button Areas" \ |
This file contains hidden or 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
$ xinput list-props 11 | |
Device 'DLL075B:01 06CB:76AF Touchpad': | |
Device Enabled (137): 1 | |
Coordinate Transformation Matrix (139): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 | |
Device Accel Profile (260): 1 | |
Device Accel Constant Deceleration (261): 2.500000 | |
Device Accel Adaptive Deceleration (262): 1.000000 | |
Device Accel Velocity Scaling (263): 12.500000 | |
Synaptics Edges (264): 48, 1167, 36, 507 | |
Synaptics Finger (265): 25, 30, 0 |
This file contains hidden or 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 doctest | |
import string | |
def break_into_chunks(message, allowance, characters_that_count_for_one, characters_that_count_for_two): | |
cursor = 0 | |
allotted = 0 |
This file contains hidden or 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
### database api, via HTTP(s), REST | |
## GET only | |
/api/1/get_directories | |
# out, text/json: { "Foo Foo": "long description", "Street Art": "Temporary and Semipermanent art" } | |
## GET only | |
/api/1/get_points_by_place/(\d+)/(\d+)/(\w+) | |
# retrieves JSON of closest 1000 items |
NewerOlder