This file contains 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
#! c:\miniconda\python | |
from collections import namedtuple | |
import time | |
import sys | |
import click | |
import wmi | |
TIMEOUT_SECONDS = 20 | |
# static configuration |
This file contains 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 pdb | |
class Config(pdb.DefaultConfig): | |
sticky_by_default = True |
This file contains 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
# log alls ssh events in ssh.log | |
destination sshd { file("/var/log/ssh.log"); }; | |
filter sshd { program("ssh"); }; | |
log { source(s_src); filter(sshd); destination(sshd); flags(final); }; |
This file contains 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
# ---------------------------------------------- | |
# command prefix | |
# ---------------------------------------------- | |
export PS1="\[\033[0;32m\]\h:\w$\[\033[0m\] " | |
# ---------------------------------------------- | |
# aliases | |
# ---------------------------------------------- | |
alias venv='source venv/bin/activate' |
This file contains 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
A warning occurred (42 apples) | |
An error occurred |
This file contains 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 | |
echo Creating new conda environment with PyQt5 installed... | |
conda create -n %1 python pyqt5 -y | |
echo Copying Qt binaries in virtual environment... | |
cp -R c:\miniconda3\Lib\site-packages\pyqt5\Qt c:\miniconda3\envs\%1\Lib\site-packages\PyQt5\ | |
echo Activating new virtual environment... | |
activate %1 |
This file contains 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 os | |
from PyInstaller import log as logging | |
from PyInstaller import compat | |
from os import listdir | |
libdir = compat.base_prefix + "/Lib/site-packages/numpy/core" | |
mkllib = filter(lambda x: x.startswith('mkl_'), listdir(libdir)) | |
other_libs = ['libiomp5md.dll'] | |
if mkllib != []: |
This file contains 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 | |
# Ports: Hier eintragen welche Ports geöffnet werden sollen | |
SERVICES_UDP="1194" #freigegebene UDP-Ports | |
SERVICES_TCP="22 25 1883 8080 8883 22044 80 5000 443 943" #freigegebene TCP-Ports (Hier sshd und http) | |
# Delete all chains | |
iptables -F # flush all chains (delete rules one by one) on default table | |
iptables -t nat -F # flush all chains on nat table | |
iptables -t mangle -F # flush all chains on mangle table |
This file contains 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/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $local_fs $remote_fs $networking | |
# Required-Stop: $local_fs $remote_fs $networking | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts supervisord - see http://supervisord.org | |
# Description: Starts and stops supervisord as needed - see http://supervisord.org | |
### END INIT INFO |
This file contains 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/sh | |
apt-get -y update | |
apt-get -y upgrade | |
echo -e "\n--- Install dev tools ---\n" | |
apt-get -y install mc htop vim git nginx | |
echo -e "\n--- Clone vim settings ---\n" | |
git clone --recursive https://github.com/MrLeeh/.vim.git | |
ln -s .vim/.vimrc .vimrc |