I hereby claim:
- I am conrad784 on github.
- I am conradsachweh (https://keybase.io/conradsachweh) on keybase.
- I have a public key ASDRXVO1YWztQvTBJ3symqrBToi6y_6CT4qY9zwqf8ZqEAo
To claim this, I am signing this object:
| def read_nonblocking(path, bufferSize=100, timeout=.100): | |
| import time | |
| """ | |
| implementation of a non-blocking read | |
| works with a named pipe or file | |
| errno 11 occurs if pipe is still written too, wait until some data | |
| is available | |
| """ | |
| grace = True |
| #!/bin/sh | |
| GITHOST="myGit" # remote server name (for ssh) | |
| REMOTE="myGit" # remote name in git config | |
| GITFOLDER="git" | |
| MYUSERNAME=$USER # assume we want to take current user account, change this at will | |
| if [ -z "$1" ]; then | |
| FOLDERNAME=$( basename $(pwd)) |
| def subprocess_get_all_outputs(cmd, shell=True, print_stdout=True, print_stderr=True): | |
| """ | |
| behaves like a subprocess.check_output() where you can get print output | |
| of stdout and stderr and both also in variables | |
| """ | |
| import subprocess | |
| out = b'' | |
| err = b'' | |
| p = subprocess.Popen(cmd, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
| while True: |
| #!/bin/sh | |
| # found here: https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/ | |
| # tried to improve to work with subfolders, but something is wrong, sometimes have to run twice | |
| git clone --bare [email protected]:conrad784/dotfiles.git $HOME/.cfg | |
| function config { | |
| /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ | |
| } | |
| function mv_fullpath(){ | |
| copy_file="$1"; | |
| #echo "cf: $copy_file"; |
| #!/bin/sh | |
| IPV4=$(curl -s -4 icanhazip.com) | |
| IPV6=$(curl -s -6 icanhazip.com) | |
| PTR4=$(curl -s -4 icanhazptr.com) | |
| PTR6=$(curl -s -6 icanhazptr.com) | |
| NETNAME=$(whois $IPV4 | grep netname | rev | cut -d ' ' -f1 | rev) | |
| echo "IPV4: $IPV4" | |
| echo "IPV6: $IPV6" |
| #!/bin/bash | |
| STOREDIR="smaller/" | |
| OUTPUTFORMAT=".mkv" | |
| SEARCHPATH="*" | |
| mkdir -p ${STOREDIR} | |
| if [ -z "$1" ] | |
| then | |
| echo "No arguments given" |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # (C) 2018 Conrad Sachweh | |
| """NAME | |
| %(prog)s - <description> | |
| SYNOPSIS | |
| %(prog)s [--help] | |
I hereby claim:
To claim this, I am signing this object: