Notice that #2 in the 2nd example is the only one that works
./envtest1;./envtest2;./envtest3
diff <(cat env_envtest1) <(cat env_envtest2)
# use the source, Luke | |
# > source remote-sftp.shsrc | |
action="df -h\nexit\n" | |
for d in / /vol /vol/homes /vol/Public; do | |
echo "${d}:" | |
echo -e "${action}" | sftp "user@fs1:${d}" | |
echo "${d}/:" |
alias lskeys='for kf in ~/.ssh/*.priv; do read -rst 2 size fingerprint userid txt <<<$(ssh-keygen -l -f ${kf});\ | |
printf "KEYFILE: %-50s - BITS: %-6d FP: %s, USER: '%s', INFO: '%s'\n" "$(basename ${kf})" "${size}" "${fingerprint}" "${userid}" "${txt}"; done' | |
#!/bin/bash | |
# rainbow | |
# A bash script that prints a nice set of colours on an ANSI terminal | |
# Written as a platform to test capability and conformance, but it's also pretty!! | |
# Written in celebration of Pride Month 2023 and support of LGBTQ+ | |
# J. Morgan (@the-moog on github) | |
# | |
# License: MIT: Free to the community not commercial gain and no warranties applied. |
I have read many articles about WSL networking that try and sort DNAT and static IP and none that I've found seem to work or only work for some. So here is my attempt....
It seems getting port forwarding to work in WSL is not easy. I think WSL has unusual hidden network mechanisms and that confuses the matter. Also when WSL boots the WSL init mechanism gives the guest a random address, which is no use for static NAT
This worked for me. Try it yourself and let me know if I've finally cracked it !!
#!/bin/bash | |
# Bash script, related to https://stackoverflow.com/a/76384868/1364242 | |
# get_real_login.sh | |
# Get the name at the time of login of the user who is running this script | |
# MIT License | |
LICENSE=" | |
Copyright (c) <2023> <https://github.com/the-moog> | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
### pyenv hook script to prepare a build env | |
# | |
# 0: Intro | |
# $MYLOC points to your local sideload root (usually ~/.local) | |
MYLOC=$HOME/.local | |
# | |
export PYTHON_CONFIGURE_OPTS="--with-openssl=$MYLOC --enable-shared --enable-optimizations --with-lto" | |
export PYTHON_CFLAGS="-march=native -mtune=native" | |
echo "" | |
echo "This is $(basename $0) hook 'build.bash':" |
# use a bash as sh is sh*# | |
.SHELL = /bin/bash -e | |
# Turn off make's legacy cruft | |
.SUFFIXES: | |
# Unless otherwise stated | |
.DEFAULT_GOAL := diff | |
# TOOLS |
#include <stdio.h> // for printf | |
#include <string.h> // for strcmp | |
// Define a card | |
typedef struct card | |
{ | |
int value; // This is an int, so it's storage size does not change | |
char * name; // This is a pointer, so it's storange size does not change | |
int rule_change; | |
} card_t; |
import timeit | |
import sys | |
import platform | |
# Expected result values vs output values (we always expect rounded down) | |
du = { | |
1.231234: 1.23, | |
1.239876: 1.23, | |
1.999999: 1.99, | |
1.00000001: 1.00, |