Installing Debian GNU/Linux from a Unix/Linux System
apt install -V krusader \
sudo \
kde-plasma-desktop\
network-manager\
network-manager-openvpn\
#!/bin/sh | |
set -x | |
# Create a folder named 'docker'. The folder would have 'executible' flag set | |
mkdir -p `pwd`/scripts/docker | |
# Add the script to the path BEFORE the rest | |
export PATH=`pwd`/scripts:$PATH |
.PHONY: target1 # Target 1 help text | |
target1: target2 target3 | |
@echo "Target 1" | |
.PHONY: target2 # Target 2 help text | |
target2: | |
@echo "Target 2" | |
.PHONY: target3 |
#!/bin/bash -x | |
set -e | |
# https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean | |
DESTINATION_IP=$1 | |
shift || (echo "E: Destination IP is not provided. Aborting"; exit 1) | |
ANCHOR_GW=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/gateway) |
Installing Debian GNU/Linux from a Unix/Linux System
apt install -V krusader \
sudo \
kde-plasma-desktop\
network-manager\
network-manager-openvpn\
Remove stoppped containers
docker rm $(docker ps -a -q --filter status=exited)
Delete all 'untagged/dangling' () image
docker rmi $(docker images -q -f dangling=true)
Remove ALL unused images > docker rmi $(docker images --format={{.Repository}}:{{.Tag}})
# class for autopsy | |
In [1]: class A: | |
...: def foo(): | |
...: pass | |
# initial investigations | |
In [16]: str(A.foo) |
TL;DR
git fsck --unreachable | grep commit | cut -d" " -f3 | xargs git log --merges --no-walk --grep=WIP
Original SO post.
import logging | |
# default config | |
logging.basicConfig() | |
# LogMessage attributes for FORMAT | |
# https://docs.python.org/3.5/library/logging.html#logrecord-attributes | |
FORMAT = '%(asctime)-15s %(message)s' | |
logging.basicConfig(format=FORMAT) |
class GetAttrNotImplementedMixin: | |
methods_to_be_implemented = {'foo', 'bar'} # add more method names | |
def __getattr__(self, name): | |
def _method_not_implemented(*args, **kwargs): | |
raise NotImplementedError("Method %s is not implemented in class %s" % (name, self.__class__.__name__)) | |
if name in self.methods_to_be_implemented: | |
return _method_not_implemented |