/usr/bin/dockerd -H tcp://127.0.0.1:2736 \
--tls --tlsverify \
--tlscacert /path/to/ca.pem \
--tlscert /path/to/server.pem \
--tlskey path/to/server_decrypted.key
https://dbader.org/blog/python-mystery-dict-expression
class One:
def __eq__(self, other):
print("[One] Comparing with {} ({})".format(other, type(other)))
if type(other) is int and other == 1:
return True
return False
0.5 ns - CPU L1 dCACHE reference
1 ns - speed-of-light (a photon) travel a 1 ft (30.5cm) distance
5 ns - CPU L1 iCACHE Branch mispredict
7 ns - CPU L2 CACHE reference
71 ns - CPU cross-QPI/NUMA best case on XEON E5-46*
100 ns - MUTEX lock/unlock
100 ns - own DDR MEMORY reference
135 ns - CPU cross-QPI/NUMA best case on XEON E7-*
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
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 |
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
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) |
TL;DR
git fsck --unreachable | grep commit | cut -d" " -f3 | xargs git log --merges --no-walk --grep=WIP
Original SO post.
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
# class for autopsy | |
In [1]: class A: | |
...: def foo(): | |
...: pass | |
# initial investigations | |
In [16]: str(A.foo) |
Installing Debian GNU/Linux from a Unix/Linux System
apt install -V krusader \
sudo \
kde-plasma-desktop\
network-manager\
network-manager-openvpn\
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
.PHONY: target1 # Target 1 help text | |
target1: target2 target3 | |
@echo "Target 1" | |
.PHONY: target2 # Target 2 help text | |
target2: | |
@echo "Target 2" | |
.PHONY: target3 |