start new:
tmux
start new with session name:
tmux new -s myname
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
--- | |
# You may override default target user with -e user=someotheruser | |
# It is mandatory to choose a strong password! At least consult with https://www.bennish.net/password-strength-checker/ | |
- name: change linux user password | |
hosts: [all] | |
gather_facts: no | |
vars_prompt: | |
## use this when 656K rounds will be OK for your servers' CPU performance, or when rounds number will become configurable in ansible | |
# You may need 'apt-get install python-passlib' or 'pip install passlib' for vars_prompt encryption |
#!/bin/bash | |
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu. | |
#See the prefix path and compile options if edits are needed to suit your needs. | |
#for ubuntu 19.04 | |
#install required things from apt | |
installLibs(){ | |
echo "Installing prerequisites" | |
sudo apt-get update |
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf | |
# Scroll History | |
set -g history-limit 50000 | |
# show messages for 4 seconds instead | |
set -g display-time 4000 | |
# set first window to index 1 (not 0) to map more to the keyboard layout | |
set-option -g renumber-windows on |
#!/usr/bin/env bash | |
# NOTE: This will let anyone who belongs to the 'pcap' group | |
# execute 'tcpdump' | |
# NOTE2: User running the script MUST be a sudoer. It is | |
# convenient to be able to sudo without a password. | |
sudo groupadd pcap | |
sudo usermod -a -G pcap $USER |
References:
From man page: man apt_preferences
sudo dpkg-reconfigure wireshark-common #Select "Yes" | |
chmod +x /usr/bin/dumpcap | |
sudo setcap 'CAP_NET_RAW+eip CAT_NET_ADMIN+eip' /usr/bin/dumpcap | |
or | |
`sudo setcap 'CAP_NET_RAW+eip CAT_NET_ADMIN+eip' $(which dumpcap)' |
# local port forwarding | |
# the target host 192.168.0.100 is running a service on port 8888 | |
# and you want that service available on the localhost port 7777 | |
ssh -L 7777:localhost:8888 [email protected] | |
# remote port forwarding | |
# you are running a service on localhost port 9999 | |
# and you want that service available on the target host 192.168.0.100 port 12340 |