(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| #!/bin/bash | |
| # | |
| # launch datascience-notebook jupypter notebook as podman container with read/write to current folder (~/work folder inside container) | |
| # | |
| # once launched open notebook in web-browser under: http://localhost:10000 | |
| # copy token from podman stdout | |
| # | |
| # based on official web site, see https://jupyter-docker-stacks.readthedocs.io/en/latest/using/running.html#using-the-podman-cli | |
| # see also: [Running rootless Podman as a non-root user | Enable Sysadmin](https://www.redhat.com/sysadmin/rootless-podman-makes-sense) | |
| # |
| #!/bin/bash | |
| OP=${1} | |
| #------------- | |
| # synergyctl | |
| # | |
| # Lots of fixes to roadst4r/synergyctl "a few minor tweaks" by roadst4r/synergyctl to the script provided by roadst4r @ http://synergy-project.org/wiki/Startup | |
| # | |
| # add support for crypto,logs,screenanme,display values | |
| #------------- |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| #!/bin/bash | |
| usage() { | |
| cat << EOF | |
| Usage: $0 [OPTION]... COMMAND | |
| Execute the given command in a way that works safely with cron. This should | |
| typically be used inside of a cron job definition like so: | |
| * * * * * $(which "$0") [OPTION]... COMMAND | |
| Arguments: |
| /** | |
| * Check if a given ip is in a network | |
| * @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
| * @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
| * @return boolean true if the ip is in this range / false if not. | |
| */ | |
| function ip_in_range( $ip, $range ) { | |
| if ( strpos( $range, '/' ) == false ) { | |
| $range .= '/32'; | |
| } |
| #!/bin/bash | |
| ### VARIABLES ### \ | |
| EMAIL="" | |
| SERVER=$(hostname) | |
| MYSQL_CHECK=$(mysql -e "SHOW VARIABLES LIKE '%version%';" || echo 1) | |
| LAST_ERRNO=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Last_Errno" | awk '{ print $2 }') | |
| SECONDS_BEHIND_MASTER=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G"| grep "Seconds_Behind_Master" | awk '{ print $2 }') | |
| IO_IS_RUNNING=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Slave_IO_Running" | awk '{ print $2 }') | |
| SQL_IS_RUNNING=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Slave_SQL_Running" | awk '{ print $2 }') |
| #!/bin/bash | |
| # | |
| # Starts up a MongoDB replica set | |
| # | |
| # There is a lot of documentation about replica sets: | |
| # | |
| # http://docs.mongodb.org/manual/reference/replica-configuration/ | |
| # http://docs.mongodb.org/manual/administration/replica-sets/ | |
| # | |
| # To read data from a SECONDARY, when in the client, use: |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| This script parses the output of the Ubuntu 'sensors' utility. | |
| The output of sensors looks like this on my machine: | |
| acpitz-virtual-0 | |
| Adapter: Virtual device |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Requirements | |
| # - Data files must be in lvm | |
| # - Optionally in xfs (xfs_freeze) | |
| # - User must have LOCK TABLES and RELOAD privilieges:: | |
| # | |
| # grant LOCK TABLES, RELOAD on *.* | |
| # to backupuser@localhost |