Browse Source

Merge remote-tracking branch 'gitea/development' into development

development
Tessa L. H. Lovelace 4 months ago
parent
commit
9560e79ca7
No known key found for this signature in database GPG Key ID: 1C84CA55B69F81D7
23 changed files with 567 additions and 45 deletions
  1. +1
    -1
      archive/.gitignore
  2. +0
    -2
      archive/server_version-6
  3. +1
    -1
      cache/.gitignore
  4. +1
    -1
      com/namer.sh
  5. +158
    -0
      com/net/pinglog.sh
  6. +1
    -1
      com/template.sh
  7. +22
    -15
      com/usr/aliases.src
  8. +13
    -1
      doc/.gitignore
  9. +28
    -0
      doc/readme.md
  10. +22
    -0
      doc/stacks/git.md
  11. BIN
      doc/stacks/git_status_2019.11.20_13.23.39.png
  12. +106
    -0
      doc/stacks/microtik.md
  13. +51
    -0
      doc/stacks/mikrotik.default
  14. +66
    -0
      doc/stacks/mikrotik.dstnat
  15. +54
    -0
      doc/stacks/mikrotik.sh
  16. +1
    -0
      log/.gitignore
  17. +0
    -1
      logs/.gitignore
  18. +13
    -17
      readme.md
  19. +5
    -0
      todo/disktest.snip
  20. +6
    -1
      todo/gpg.snip
  21. +7
    -4
      todo/list.md
  22. +0
    -0
      todo/p3p.snip
  23. +11
    -0
      todo/workflow.snip

+ 1
- 1
archive/.gitignore View File

@@ -1 +1 @@
# File preserves folder structure, do not remove.
# file must exist to preserve folder structure in version control

+ 0
- 2
archive/server_version-6 View File

@@ -1,2 +0,0 @@
6
13

+ 1
- 1
cache/.gitignore View File

@@ -1 +1 @@
# File preserves folder structure, do not remove.
# file must exist to preserve folder structure in version control

+ 1
- 1
com/namer.sh View File

@@ -1,4 +1,4 @@
#!/usr/local/bin/bash
#!/bin/bash
# @author:'jakimfett'
# @license;'cc-by-sa'



+ 158
- 0
com/net/pinglog.sh View File

@@ -0,0 +1,158 @@
#!/bin/bash



# NAME variable is used for log file and screen instance naming
NAME="default"

# Log file location
SAVETO="${HOME}/pinglogs"
mkdir -p "$SAVETO"

# ENDPOINT set to nothing by default
ENDPOINT=""

# How high should the ping get before it is logged
MINPING=100

CHECKSITEROOT=0

########### Include functions ###########
if [[ `git status 2>&1| head -1 ` == *"fatal"* ]];then curl --silent http://quince.ocp.org/functions.sh -o ./functions.sh;fi
source "`dirname "$0"`/functions.sh"
if [ ! "`type -t siteRootCheck`" == "function" ];then echo "Please navigate to the website root folder and try again";exit;fi
########### End include functions #######

SCREEN=0

function usageHelp {
echo
echo "Usage: $0 COMMAND OPTIONS"
echo
echo "Available commands:"
echo -e " --default|-d \t Executes writeConfigHeader and createSandboxCertificates in order. Non-interactive."
echo
echo -e " --help|-h \t\t Displays commands and usage info."
echo -e " --background|-b \t Executes logging in the background via 'screen -S ' DNS validation in child processes (faster)."
echo -e " --force|-f \t\t Forces renewal of domains, regardless of expiry date."
echo -e " <empty> \t\t Displays the same info as '$0 help'"
echo
}

IPCHECK=0
UNKNOWN=0
UNRECOGNIZED=0
for i in "$@"; do
case "$i" in
--background|-b)
# Use screen to run logging in the background
SCREEN=1
;;
--force|-f)
# Execute all commands interactively
FORCERENEW=1
;;
--debug=true|--debug|--debug=false)
;;
--dry-run|--dry-run=true|--dry-run=false)
;;
--help|help|-h|h)
;;
--interactive|interactive|-i|i)
;;
*)
# Display unknown command warning and help/usage info
UNKNOWN=$i
IPCHECK=1
;;
esac
done

if [ -z $@ ];then
HELP=1
fi

# Echo the full command line options string if a command isn't recognized.
if [ $UNRECOGNIZED -ne 0 ];then
echo "Command not recognized:"
echo "'$0 $*'"
fi

# If the user needs help, display help.
if [ $HELP -ne 0 ];then
usageHelp
exit 1
fi

if [ $IPCHECK -ne 0 ];then
if [[ $i =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
# Endpoint is an IP address
ENDPOINT=$i
elif [[ $i =~ ^[A-Za-z]*\.[A-Za-z]{1,5}$ ]]; then
# Endpoint is a normal domain
ENDPOINT=$i
elif [[ $i =~ ^[A-Za-z]{1,10}\.[A-Za-z]*\.[A-Za-z]{1,5}$ ]]; then
# Endpoint is a subdomain
ENDPOINT=$i
else
echo "No match for domain '${UNKNOWN}'"
exit
fi
fi

LOGLOCATION="${SAVETO}/${NAME}_pinglog_$(date +%Y-%m-%d).log"
touch $LOGLOCATION

if [ ! -z $SANITYCHECK ];then
SANITYLOGLOCATION="${SAVETO}/${NAME}_sanitycheck_pinglog_$(date +%Y-%m-%d).log"
touch $SANITYLOGLOCATION
fi

function getPingTime {
for i in "$@"; do
if [[ $i == *"time"* ]];then
echo $i | cut -c 6-
fi
done
}


ping $ENDPOINT 2>&1 | while read pong 2>&1;do
pingdate="$(date +%Y-%m-%d\ %T):"
pingduration=$(getPingTime $pong )
echo "$pingdate $pingduration"
#echo $pong;
# awk -v \
# -v minping="$MINPING" \
# -v pingtime="$(awk '"'"'{ print $7 }'"'"' <<< $pong | cut -c 6-)" \
# -v dead="$(awk '"'"'{ print $5 }'"'"' <<< $pong )" '"'"'{ if (pingtime > minping) {print date, pong } if ( dead == "unreachable" ) {print date, pong } }'"'"' <<< $pong | tee -a $LOGLOCATION
done

exit



COMMAND="ping $ENDPOINT 2>&1"



if [ $SCREEN -ne 0 ];then
screen -dm -S $NAME bash -c "$COMMAND"
else
bash -c "$COMMAND"
fi


echo "Saving log to $PINGLOG"
printf "\nStarting new ping test at: $(date)\n" | tee -a $PINGLOG









+ 1
- 1
com/template.sh View File

@@ -1,6 +1,6 @@
#!/bin/bash
# @author:'`whoami`'
# @license;'cc-by-sa'
# @license: 'cc-by-sa'
#
# Meta script that tries to write itself, and sometimes the universe.



+ 22
- 15
com/usr/aliases.src View File

@@ -11,9 +11,9 @@
# This one goes out to Nune,
# wherever she may be.

# Share commands with sibling shells
export HISTSIZE= # <-- disable size-based trimming of history file.
export HISTFILESIZE= # <-- same as above, just in a different place.
### Share commands with sibling shells ###
export HISTSIZE= # <-- disable size-based trimming of history file.
export HISTFILESIZE= # <-- same as above, just a different variable.
shopt -s histappend # <-- append to the history file sooner than later.
shopt -s expand_aliases # <-- expand aliases into the alias'd commands, useful for opsec and reverse-engineering of your own crufty stuff.
export PROMPT_COMMAND="history -a;$PROMPT_COMMAND" # <~~ unsure what this one does, exactly. @todo look this up.
@@ -30,21 +30,21 @@ alias nano="nano --nowrap --tabsize 2"
alias gg='sudo su --login'
alias lac='laminarc'

# colorized ls:
# colorized ls
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
alias ll='ls $LS_OPTIONS -lah'

# Project Locations
### Project Locations ###
alias fsh='cd "$(realpath ~/functions.sh)"'
alias fdv='cd "$(realpath ~/f.sh)"'
alias fdev='cd "$(realpath ~/f.sh)"'

# Always know *when* you are.
### Always know *when* you are. ###
dateTimeFormat='+%Y.%m.%d_%R.%S_(UTC%z,%Z)'
alias chronoStamp="date -j '${dateTimeFormat}'"
alias chronoStampUTC="date -j -u '${dateTimeFormat}'"

# Quality of Life shortcuts
### Quality of Life shortcuts ###
alias search='lynx https://start.duckduckgo.com'
alias pathadd='export PATH="$(realpath `pwd`):${PATH}"'

@@ -54,14 +54,19 @@ alias usbScan='chronoStamp && lsusb && echo'
# Know how you connect to the world outside your network ports.
alias getPublicAddress='curl icanhazip.com'

# Do things in more than one place at once. # <-- summary
alias twm='dtach -A ~/session/default -r winch dvtm' # <-- command

# Open a tileable, disconnectable window session.
# Uses seconds since the unix epoc as the workspace differentiation postfix.
# command fails if ~/session directory fails to exist, @todo check and remediate
alias twm='dtach -A ~/session/default.$(date +"%s") -r winch dvtm'

# Multitasking is an essential part of a broken workflow. # <-- philosophy
# Do one thing at a time via multiple viewports.
# The terminal windows are portals to different parts of the machine.

# Fix mosh, because.
export PATH=/usr/local/bin:$PATH
### Useful SSH-adjacent aliases ###
# patchwork'd from https://unix.stackexchange.com/a/349821
alias ssh-showkey='ssh-keygen -lf <(ssh-keyscan localhost 2>/dev/null)'

# set rm/cp/mv to interactive mode:
alias rm='rm -i'
@@ -71,9 +76,11 @@ alias mv='mv -i'

# Debian sysadmin alias(es)
alias update="sudo apt update; sudo apt install -f -y; sudo apt autoremove -y"
alias upgrade="update; sudo apt dist-upgrade -y;"
alias uprepair='update; sudo apt install --fix-broken; sudo apt install --fix-missing;'
alias shutgrade='upgrade; sudo shutdown -hP now'
alias uprepair="update; sudo apt install --fix-broken; sudo apt install --fix-missing"
alias upgrade="update; sudo apt dist-upgrade -y;uprepair"
alias shutgrade="upgrade; sudo shutdown -hP now"
alias regrade="upgrade; sudo reboot now"

# figuring out what is installed manually
alias ais="grep 'apt' ~/.bash_history | grep install | grep -v failmuffins | sort | uniq | cut -d' ' -f3- | awk '{print}' ORS=' ' ; echo"



+ 13
- 1
doc/.gitignore View File

@@ -1 +1,13 @@
# folder structure marker, file must exist
# elsewhere than the docs, a .gitignore file is often used to preserve
# folder structure in version control
#
# @author: jakimfett
# @purpose: establish a working folder structure
# @license: tbd, all rights reserved
#
# @description:;
# This version controlled textfile ensures that cloning the repository
# results in a folder structure correct for immediate use.
# Additionally, this documentation file demonstrates some autodoc features.
#
# @tldr: folder structure marker, file must exist

+ 28
- 0
doc/readme.md View File

@@ -0,0 +1,28 @@
# definitions

Words have meanings.

Some of these meanings are anchored here to encourage communication with mutual understanding of language.

## env
The environments of a functional software development pipeline defined here are suggestions.

Normalization is only beneficial so far as it suits the application.
Each successive layer is built by copying and improving the preceeding tier.

Do your own analysis, and use what works for you, tho.

0) Prototype: functional proof-of-concept for research, evaluation, or testing.
1) Development: version controlled codebase, hosted locally, has backups.
2) Testbed: multi-user, unscaled instance, local data, has tested backups.
2.a) Deployment: infrastructure is code, update/test/rollback SOP.
3) Stage: autoscale feature flags, remote data, stress tested.
4) Live: available to intended clientel, feedback loop in place.
5) Depricated: available, but de-prioritized.
6) Archive: snapshotted, decommissioned, projects closed.

A healthy development cycle flows from four through six and two, each iteration trimming inefficiencies and improving robustness.

If a system is not stable, it cannot meet the needs of the users, no matter how well designed it may be. For some clients, a prototype system is all that is ever needed. For others, anything less than autoscaling capable of millions of simultaneous user sessions is incomplete.

Knowing your use case and deployment environment, and maintaining working functional requirements, will save much future grief.

+ 22
- 0
doc/stacks/git.md View File

@@ -0,0 +1,22 @@
May have bitten off more than I can chew with this one.

```
Compile failed: 2h 27m 18s
```



# Appendices
https://stackoverflow.com/questions/9500898/compiler-error-msgfmt-command-not-found
https://www.linuxquestions.org/questions/linux-software-2/sh-tclsh-command-not-found-777605/
https://stackoverflow.com/questions/11471690/curl-h-no-such-file-or-directory

https://www.openssl.org/source/gitrepo.html
https://www.ephestione.it/lighttpd-cannot-install-because-of-libssl1-1-how-to-fix/
https://unix.stackexchange.com/questions/404995/how-to-update-openssl-library
https://raspberrypi.stackexchange.com/questions/33597/cant-apt-get-install-libssl-dev
https://github.com/servo/servo/issues/21778
https://github.com/sysown/proxysql/issues/1455
https://unix.stackexchange.com/questions/394456/how-to-convince-dpkg-that-libssl1-0-2-is-libssl1-0-0
https://superuser.com/questions/1417691/libssl-dev-dependency-issue-on-ubuntu-18-04/1418037
https://stackoverflow.com/questions/17915098/openssl-ssl-h-no-such-file-or-directory-during-installation-of-git

BIN
doc/stacks/git_status_2019.11.20_13.23.39.png View File

Before After
Width: 653  |  Height: 1753  |  Size: 189 KiB

+ 106
- 0
doc/stacks/microtik.md View File

@@ -0,0 +1,106 @@
So I've got a mikrotik router.

In theory, it'll let me connect to wireless, and then bridge the connection to all ethernet connected devices in my home lab.

# Ugh. Mikrotik.
I say in theory, because with mikrotik, it's never quite that simple.

You can get it to play music from the command line immediately on reset, but connecting cleanly to wireless? Nah, that'll take a week.

Why?
Mostly a lack of parity between the various GUI modes and the command line interface(s). The documentation is specific to one of three paradigms (most of the time) and translating to a different paradigm is nearly impossible unless you already know the structure of both interfaces.

## Hard Reset
Unplug the device.
Press the 'reset' button (usually in a hole on the back side).
Plug the device back in, and wait 5-7 seconds.

An LED should start blinking (although it more sporadically flickers on my box...).

Release the reset button BEFORE the 10 second mark.

Let the board do its thing.

# Securing
By default, the user is 'admin' and the password is empty.

THIS IS VERY INSECURE, MIKROTIK. FIX YOUR DEFAULTS.

## Users
Connect to the router via ssh.
(@todo - set up mosh?)

You'll need the router's IP address.
``

`ssh admin@`

```

MMM MMM KKK TTTTTTTTTTT KKK
MMMM MMMM KKK TTTTTTTTTTT KKK
MMM MMMM MMM III KKK KKK RRRRRR OOOOOO TTT III KKK KKK
MMM MM MMM III KKKKK RRR RRR OOO OOO TTT III KKKKK
MMM MMM III KKK KKK RRRRRR OOO OOO TTT III KKK KKK
MMM MMM III KKK KKK RRR RRR OOOOOO TTT III KKK KKK

MikroTik RouterOS 6.40.4 (c) 1999-2017 http://www.mikrotik.com/

[?] Gives the list of available commands
command [?] Gives help on the command and list of arguments

[Tab] Completes the command/word. If the input is ambiguous,
a second [Tab] gives possible options

/ Move up to base level
.. Move up one level
/command Use command at the base level
The following default configuration has been installed on your router:
-------------------------------------------------------------------------------
RouterMode:
* WAN port is protected by firewall and enabled DHCP client
* Wireless interfaces are part of LAN bridge
wlan1 Configuration:
mode: ap-bridge;
band: 2ghz-b/g/n;
ht-chains: 0,1;
ht-extension: 20/40mhz-Ce;
LAN Configuration:
switch group: ether2 (master), ether3, ether4, ether5
switch group: ether6 (master), ether7, ether8, ether9, ether10
IP address 192.168.88.1/24 is set on LAN port
DHCP Server: enabled;
DNS: enabled;
WAN (gateway) Configuration:
gateway: ether1 ;
ip4 firewall: enabled;
ip6 firewall: enabled;
NAT: enabled;
DHCP Client: enabled;

-------------------------------------------------------------------------------
You can type "v" to see the exact commands that are used to add and remove
this default configuration, or you can view them later with
'/system default-configuration print' command.
To remove this default configuration type "r" or hit any other key to continue.
If you are connected using the above IP and you remove it, you will be disconnected.

```
## Scripting & Shell Access
## Updates
## HTTPS

# Appendices
https://wiki.mikrotik.com/wiki/Manual:Reset#Using_reset_button
https://wiki.mikrotik.com/wiki/Connect_to_an_Available_Wireless_Network
https://wiki.mikrotik.com/wiki/Manual:Interface/Wireless

https://mikrotik.tips/connecting-2-remote-places-using-wireless-bridge/

https://www.reddit.com/r/mikrotik/comments/4rdbgs/dhcp_over_a_wireless_bridge_link/
https://jcutrer.com/howto/networking/mikrotik/mikrotik-tutorial-adding-a-2nd-wireless-ssid-virtual-access-point

https://mikrotik.com/documentation/manual_2.7/Interface/Wireless.html#ht276178286
https://www.reddit.com/r/mikrotik/comments/78t2p7/metal_52ac_connects_to_wifi_but_wont_let_me_use/
https://www.reddit.com/r/mikrotik/comments/3mm0rl/help_dhcp_issue_in_setting_up_rb2011uias2hndin/
https://wiki.mikrotik.com/wiki/Manual:Wireless_Station_Modes

+ 51
- 0
doc/stacks/mikrotik.default View File

@@ -0,0 +1,51 @@
# exported 2019.11.02 from RouterOS 6.38.1
#
/interface ethernet
set [ find default-name=ether2 ] name=ether2-master
set [ find default-name=ether3 ] master-port=ether2-master
set [ find default-name=ether4 ] master-port=ether2-master
set [ find default-name=ether5 ] master-port=ether2-master
/ip neighbor discovery
set ether1 discover=no
/ip pool
add name=dhcp ranges=192.168.88.2-192.168.88.100
/ip dhcp-server
add address-pool=dhcp disabled=no interface=ether2-master name=defconf
/ip address
add address=192.168.88.1/24 comment=defconf interface=ether2-master network=\
192.168.88.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=\
ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1 netmask=24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept established,related" \
connection-state=established,related
add action=drop chain=input comment="defconf: drop all from WAN" \
in-interface=ether1
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related" \
connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface=ether1
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
out-interface=ether1
/system routerboard settings
set cpu-frequency=600MHz silent-boot=yes
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2-master
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master

+ 66
- 0
doc/stacks/mikrotik.dstnat View File

@@ -0,0 +1,66 @@
# jan/02/1970 00:24:59 by RouterOS 6.38.1
# software id = V6J1-6BDA
#
/interface ethernet
set [ find default-name=ether2 ] name=ether2-master
set [ find default-name=ether3 ] master-port=ether2-master
set [ find default-name=ether4 ] master-port=ether2-master
set [ find default-name=ether5 ] master-port=ether2-master
/ip neighbor discovery
set ether1 discover=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp ranges=172.16.0.100-172.16.0.198
/ip dhcp-server
add address-pool=dhcp disabled=no interface=ether2-master name=defconf
/ip address
add address=172.16.0.1/24 comment=defconf interface=ether2-master network=\
172.16.0.0
add address=198.15.4.183/24 interface=ether1 network=198.15.4.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid interface=ether1
/ip dhcp-server lease
add address=172.16.0.10 mac-address=A8:20:66:12:2F:6F server=defconf
/ip dhcp-server network
add address=172.16.0.0/24 comment=defconf gateway=172.16.0.1 netmask=24
/ip dns
set allow-remote-requests=yes servers=198.15.0.2,1.0.0.1,8.8.8.8
/ip dns static
add address=172.16.0.1 name=router
/ip firewall filter
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept established,related" \
connection-state=established,related
add action=drop chain=input comment="defconf: drop all from WAN" \
in-interface=ether1
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related" \
connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface=ether1
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
out-interface=ether1
add action=dst-nat chain=dstnat comment="Badfruit Web - HTTPS" in-interface=\
ether1 protocol=tcp src-port=443 to-addresses=172.16.0.10 to-ports=443
add action=dst-nat chain=dstnat in-interface=ether1 protocol=tcp src-port=80 \
to-addresses=172.16.0.10 to-ports=80
/ip route
add distance=1 gateway=198.15.4.1
/system identity
set name=Acolyte
/system routerboard settings
set cpu-frequency=600MHz silent-boot=yes
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2-master
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master

+ 54
- 0
doc/stacks/mikrotik.sh View File

@@ -0,0 +1,54 @@
#!/bin/bash
# @author: jakimfett
# @license: cc-by-sa
#
# Autoconfig and backup/export for MikroTik network hardware.

declare -A config stateVar doneList

# Network Config
config['net']='/24'
config['wan']='198.15.4.183'
config['lan']='172.16.0.1'
config['gateway']='198.15.4.1'
config['dns']='198.15.0.2,1.0.0.1,8.8.8.8'

# Identity Config
config['user']='sysadmin'
config['pass']='4khF4wc6qcgUeqga6O3aSqH1uSBVf'

stateVar['routerID']=''

function initialSetup {
# Create user for scripting
# Set up user pubkey access
# Save to config file for later use?
# @todo decide where to store passphrases & ssh keys for fsh
}

funtions getIdentity {
ssh
}

function exportConfig {
echo "Starting export process."
local exportFile=""
}


# @todo move input processing to core.sh
for i in "$@"; do
case "$i" in
-[0-9]*)
config['length']=${i:1}
;;
'-n'|'--numeric' )
config['numeric']=1
;;
# -o|--obfuscate )
# config['obfuscate']=1
# ;;
*)
;;
esac
done

+ 1
- 0
log/.gitignore View File

@@ -0,0 +1 @@
# file must exist to preserve folder structure in version control

+ 0
- 1
logs/.gitignore View File

@@ -1 +0,0 @@
# folder structure marker, file must exist

+ 13
- 17
readme.md View File

@@ -1,27 +1,23 @@
# functions.sh
Several shell scripts stacked on top of eachother, pretending to be something useful.
Several shell scripts stacked on top of eachother, attempting to be useful.

# assumptions
# assumptions
You solemnly swear you're up to no good.
You understand that this is a work in progress.
I use this on my production systems.
If you don't understand this codebase thoroughly, don't use it on live.

# definitions
Live
Testbed
Dev
Stage
You will understand what something does before executing it.

# disclaimer
Shell scripts are dangerous.
This one moreso than most.
If you break something with this tool you borrow from me, that's on you.
This one moreso than some.
If you break something with a borrowed tool, that's on you.

This particular set of scripts is optimized for use inside the Bourne-Again shell v4.x (and above) on a 2019-current-ish Debian/Raspbian system, in a homelab.

You CentOS/RedHat/BeOS/BSD/Unix/etc experience may be debuging-laden.

Submit a bug report and explain what happened, and I'll try to fix it.
I also accept pull requests.
Bugfix and other contributions welcome.

# license
# license
© 2015-2022 @jakimfett
All rights reserved.
All material contained in this repository is licensed for use, redistribution, and modification under _Creative Commons 4.0 Attribution+ShareAlike ([CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/))._
All rights reserved.
All material contained in this repository is licensed for use, redistribution, and modification under _Creative Commons 4.0 Attribution+ShareAlike ([CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/))._

+ 5
- 0
todo/disktest.snip View File

@@ -0,0 +1,5 @@
#!/bin/bash
echo "You are not ready"
exit 1
sudo -v
sudo dd if=/dev/zero of=~/test1.file bs=1048576 count=2048 &

+ 6
- 1
todo/gpg.snip View File

@@ -1,3 +1,8 @@
# https://help.github.com/articles/signing-commits-using-gpg/
# @todo - set up automatic GPG signing setup
#git config commit.gpgsign true


If you already have a GPG key, you can find it via the `gpg --list-keys` command.

`git config commit.gpgsign true`
`git config --global user.signingkey`

+ 7
- 4
todo/list.md View File

@@ -1,12 +1,14 @@
# A running list of todo items
...that apply to more than just a single file.

# format
@todo - <entry>

# A running list of todo items
...that are more applicable than just a single file.

## runninglist
@todo - fix osx failure to tab-complete, maybe just burn down the OS and start over (again)?

@todo - combine program structure and documentation
@todo - create a newline automatic repeat for '@todo - '
@todo - definitions. ugh.
@todo - set up laminar artifact downloading
@todo - script to move all non-tracked files out of f.sh before killing a checkout completely
@todo - dependency list
@@ -19,3 +21,4 @@
@todo - breakfast, also vits&tea
@todo - write script to autoreplace WAN links with archive.is and internetarchive links, with generation/curlhash/httpcodeverification.
@todo - add kanban.bash to install process/prerequisites (https://github.com/coderofsalvation/kanban.bash)
@todo - programmatically display included & sourced files for current shell, along with $PATH and other environment variables.

doc/p3p.md → todo/p3p.snip View File


+ 11
- 0
todo/workflow.snip View File

@@ -0,0 +1,11 @@
#!/bin/bash
# @todo - document this mess

shortcommand: `gst`
longhand: `git status`
manual: `gi<TAB/>st<TAB/>`
description:
This command alias eliminates two tabulation key presses, or six vs longhand.

process:
describe, refactor, debug, commit.

Loading…
Cancel
Save