I hereby claim:
- I am alexelvers on github.
- I am aelvers (https://keybase.io/aelvers) on keybase.
- I have a public key whose fingerprint is 29C9 1451 2D0B 7FEB D63E 43B7 7DB1 096F FD76 DBBA
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
activate() { | |
local path_="$PWD" | |
while [[ "$path_" != "/" ]]; do | |
if [[ -e "$path_/Pipfile" ]]; then | |
echo "Pipfile found in $path_" | |
pipenv shell | |
return 0 | |
elif [[ -e "$path_/env/bin/activate" ]]; then | |
echo "virtual env found in $path_" | |
source "$path_/env/bin/activate" |
""" | |
This function encodes the password similar to `doveadm pw -p PASSWORD -r ROUNDS -s SCHEME`, e.g. | |
{SHA256-CRYPT}$5$rounds=100000$vEmVf8wqYqnBHbFL$ed0W1.B1A3vw4dzXhBQjgxh7FB/lVSsmDAQahyzHJDB | |
""" | |
import crypt | |
def encode_password(password: str, rounds: int = None, scheme: str = None) -> str: | |
""" | |
Encode password with random salt. |
twittersafepng() { | |
outfile="${1/.png}_twittersafe.png" | |
convert "$1" -alpha on -fill '#000000fe' -draw 'matte 0,0 point' "$outfile" | |
echo "written to $outfile" | |
} |
#!/bin/bash | |
# Replaces /etc/acpi/handler.sh | |
case "$1" in | |
button/power) | |
case "$2" in | |
PBTN|PWRF) | |
logger 'PowerButton pressed' | |
gnome_users=$(pgrep gnome-session | xargs ps -o %u -p | sed 1d) | |
while read -r user; do |