Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)| This file is part of Whonix | |
| Copyright (C) 2012 - 2014 Patrick Schleizer <[email protected]> | |
| See the file COPYING for copying conditions. | |
| **** Do NOT edit this file! **** | |
| This file will show you examples you can copy and paste to /etc/tor/torrc | |
| Additionally, you can read the official Tor Manual at: | |
| https://www.torproject.org/docs/tor-manual.html.en |
| ## Configuration file for a typical Tor user | |
| ## Last updated 28 February 2019 for Tor 0.3.5.1-alpha. | |
| ## (may or may not work for much older or much newer versions of Tor.) | |
| ## | |
| ## Lines that begin with "## " try to explain what's going on. Lines | |
| ## that begin with just "#" are disabled commands: you can enable them | |
| ## by removing the "#" symbol. | |
| ## | |
| ## See 'man tor', or https://www.torproject.org/docs/tor-manual.html, | |
| ## for more options you can use in this file. |
| # wget 'https://mirrors.slackware.com/slackware/slackware64-current/kernels/huge.s/bzImage' | |
| # # find / -name 'snd-hwdep.ko' 2>/dev/null | |
| # /usr/src/linux-4.14.40/sound/core/snd-hwdep.ko | |
| # /lib/modules/4.14.40/kernel/sound/core/snd-hwdep.ko | |
Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
based on https://wiki.archlinux.org/index.php/Systemd/Timers#MAILTO
systemd-email.sh to /usr/local/bin/systemd-email[email protected] to /etc/systemd/system/OnFailure=OnFailure=status-email-alerts@%n.service into the [Unit] section of a serviceCreate file /usr/local/bin/systemd-email
| # SNAKES GAME | |
| # Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting | |
| import curses | |
| from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN | |
| from random import randint | |
| curses.initscr() | |
| win = curses.newwin(20, 60, 0, 0) |
| # -*- coding: utf-8 -*- | |
| import distutils.spawn | |
| import os | |
| import re | |
| import socket | |
| import subprocess | |
| import xcffib.xproto | |
| from libqtile import layout, bar, widget, hook | |
| from libqtile.command import lazy |
| import pickle | |
| import weakref | |
| from contextlib import contextmanager, suppress | |
| from datetime import datetime | |
| from itertools import islice | |
| from logging import getLogger | |
| from pathlib import Path | |
| from libqtile import bar, hook, layout, widget | |
| from libqtile.command import lazy |
| # /etc/systemd/system/docker.service.d/docker-nftables.conf | |
| # disable iptables in docker, allowing nftables to do work | |
| [Service] | |
| ExecStart= | |
| ExecStart=/usr/bin/docker daemon -H fd:// --iptables=false |