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
## docker / kubernetes | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | |
sudo apt-get update | |
sudo apt install docker docker-compose docker-ce docker-ce-cli conntrack containerd.io -y | |
sudo usermod -aG docker $USER | |
newgrp docker | |
cd ~ | |
VERSION="v1.26.0" | |
wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz |
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 python | |
import itertools | |
import sys | |
import time | |
import threading | |
class Spinner(object): | |
spinner_cycle = itertools.cycle(['-', '/', '|', '\\']) |
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
@echo off | |
REM this script performs a hard reset of local CiscoJabber profile data | |
echo #Stop CiscoJabber.exe... | |
taskkill /f /im CiscoJabber.exe | |
echo #Clear Roaming Profile | |
cd "%APPDATA%\Cisco\Unified Communications" | |
rd /s /q "Jabber" | |
echo #Clear Local Profile | |
cd "..\Local\Cisco\Unified Communications" | |
rd /s /q "Jabber" |
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
# -*- coding: utf-8 -*- | |
data = ''' | |
# put your html data here (e.g. with requests or from file) | |
''' | |
import bs4 | |
soup = bs4.BeautifulSoup(data) |
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
# if you're tired of a mere print, try this: | |
# not perfect, but works | |
def log(m="\n", l=1): | |
__VERBOSE__ = 0 | |
if __VERBOSE__ > l-1: print "M:"," "*l , m | |
# this is a simple construct for debugging purposes | |
log("foo", 5) | |
log("bar", 3) | |
log("="*80, 2) |
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/python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
from __future__ import division | |
from __future__ import absolute_import | |
try: | |
from future_builtins import * | |
except ImportError: | |
pass |
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/python | |
# -*- coding: utf-8 -*- | |
from random import triangular | |
# useful for some experiments | |
def biasrandint(low=0, hi=100, bias=75): | |
return int(triangular(low, hi, bias)) #triangular itself returns a float | |
if __name__ == '__main__': | |
print(biasrandint()) |
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 | |
today=`date +%Y%m%d.%H%M%S` | |
# same will work with tshark: | |
tcpdump -c 10240 -w /tmp/t$today.pcap & | |
tcpdump -c 10240 > /tmp/t$today.txt |
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
# author: Tom Lichtenberg | |
# http://softwaretestautomationnotes.blogspot.com/2011/11/reading-outlook-email-with-python.html | |
import win32com.client | |
class OutlookLib: | |
def __init__(self, settings={}): | |
self.settings = settings |
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
https://twitter.com/katrielalex/status/984373545248706560 | |
Katriel | |
@katrielalex | |
Here begins a list of little LaTex snippets that make documents look better. What's that you say, I should be writing my thesis? Naaaaaah | |
0/x |
NewerOlder