#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.
-
putty
Set
Connection -> Data -> Terminal-type string
toxterm-256color
-
tmux
Add this line to ~/.tmux.conf
# Windows (receiver) side: | |
.\ffplay.exe -nodisp -ac 2 -acodec pcm_u8 -ar 48000 -analyzeduration 0 -probesize 32 -f u8 -i udp://0.0.0.0:18181?listen=1 | |
# Linux (transmitter) side: | |
pactl load-module module-null-sink sink_name=remote | |
ffmpeg -f pulse -i "remote.monitor" -ac 2 -acodec pcm_u8 -ar 48000 -f u8 "udp://RECEIVER:18181" | |
pavucontrol # Change the default output to the Null sink or move single applications to this "output" device. |
#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.
putty
Set Connection -> Data -> Terminal-type string
to xterm-256color
tmux
Add this line to ~/.tmux.conf
#!/bin/bash | |
if [ -d "/store" ]; then | |
echo "Destroy the array first. Or don't. That's kinda the point of this message." | |
exit 1 | |
fi | |
echo SERIAL1 $( smartctl --attributes /dev/disk/by-id/ata-MODEL_SERIAL1 | grep UDMA ) | |
echo SERIAL2 $( smartctl --attributes /dev/disk/by-id/ata-MODEL_SERIAL2 | grep UDMA ) | |
echo SERIAL3 $( smartctl --attributes /dev/disk/by-id/ata-MODEL_SERIAL3 | grep UDMA ) |
#!/bin/bash | |
# | |
# Usage grep-with-gpg path/to/encrypted/files/* | |
# | |
if [ -z "$1" ]; then | |
echo "Usage: $0 'search string' [path/to/encrypted/files/*]"; | |
exit 1; | |
else | |
SEARCH=$1; |
A copy/paste guide to getting a full working astro-imaging computer running on Ubuntu 20.04 LTS. Installs latest stable versions of gpsd, KStars, INDI, OACapture, SkyChart, ASTAP, and Astrometry.net.
It uses the lightweight XFCE4 desktop, and allows you to VNC in, running everything locally on the astro-imaging pc.
import tensorflow as tf | |
# credit: https://stackoverflow.com/a/66524901/9215780 | |
class CustomTrainStep(tf.keras.Model): | |
def __init__(self, n_gradients, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.n_gradients = tf.constant(n_gradients, dtype=tf.int32) | |
self.n_acum_step = tf.Variable(0, dtype=tf.int32, trainable=False) | |
self.gradient_accumulation = [tf.Variable(tf.zeros_like(v, dtype=tf.float32), | |
trainable=False) for v in self.trainable_variables] |
Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store
. For more information about GPG, consult the GNU Privacy Handbook.
To get started, install pass
and generate a keypair.
$ brew install pass
$ gpg --gen-key
$ gpg --list-keys