Compare commits
No commits in common. "7e01e88b9d09ff6939cff7d07c31e66b386bab17" and "6b501af1f94b7a08448648264cac3a838c3a8373" have entirely different histories.
7e01e88b9d
...
6b501af1f9
21
aerc.bash
21
aerc.bash
|
@ -1,21 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Best practice options
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
|
|
||||||
main() {
|
|
||||||
export BW_SESSION=$(
|
|
||||||
bw unlock --passwordfile ~/.bwpass |
|
|
||||||
grep "\--session " |
|
|
||||||
awk '{print $NF}'
|
|
||||||
)
|
|
||||||
aerc
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Best practice options
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
|
|
||||||
|
|
||||||
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
|
|
||||||
echo 'Usage:
|
|
||||||
bundle_update.sh test_command
|
|
||||||
'
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
declare -a UPDATE_LEVELS=(patch minor major)
|
|
||||||
|
|
||||||
TEST_COMMAND=$1
|
|
||||||
$TEST_COMMAND
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Tests failed prior to updating any gems. Exiting."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
DATE=`date "+%F"`
|
|
||||||
git checkout -b "bundle_update_$DATE"
|
|
||||||
|
|
||||||
for level in "${UPDATE_LEVELS[@]}"; do
|
|
||||||
dip bundle update --$level
|
|
||||||
$TEST_COMMAND
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Tests failed after $level update, rolling those changes back."
|
|
||||||
git restore .
|
|
||||||
break
|
|
||||||
else
|
|
||||||
echo "Tests passed after $level update, committing changes."
|
|
||||||
git add -A
|
|
||||||
git commit -m "Successful automatic $level update"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
git push -u origin $(git symbolic-ref --short HEAD) -o merge_request.create # Create remote branch
|
|
68
c66.bash
68
c66.bash
|
@ -1,68 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Best practice options
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
|
|
||||||
|
|
||||||
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
|
|
||||||
echo 'Usage:
|
|
||||||
c66 ssh Select and SSH to a server
|
|
||||||
c66 log file role Select a stack and tail the file “file” on all its servers
|
|
||||||
'
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
pushd ~
|
|
||||||
|
|
||||||
############################################################
|
|
||||||
## Main commands
|
|
||||||
############################################################
|
|
||||||
|
|
||||||
cx_ssh() {
|
|
||||||
set_stack
|
|
||||||
set_server
|
|
||||||
cx ssh --stack $APPLICATION --environment $ENVIRONMENT $SERVER
|
|
||||||
}
|
|
||||||
|
|
||||||
cx_log() {
|
|
||||||
set_stack
|
|
||||||
OUTPUT_FILE=$(mktemp)
|
|
||||||
echo "Logging to $OUTPUT_FILE"
|
|
||||||
SERVERS=$(cx servers list --stack $APPLICATION --environment $ENVIRONMENT | grep "\[.*$ROLE.*\]" | cut -d ' ' -f1)
|
|
||||||
for SERVER in ${SERVERS// /} ; do
|
|
||||||
echo "Following $LOG_FILE on $SERVER"
|
|
||||||
cx tail --stack $APPLICATION --environment $ENVIRONMENT $SERVER $LOG_FILE > ./$SERVER.log &
|
|
||||||
done
|
|
||||||
#tail -f $OUTPUT_FILE
|
|
||||||
#pkill cx
|
|
||||||
}
|
|
||||||
|
|
||||||
############################################################
|
|
||||||
## Helper functions
|
|
||||||
############################################################
|
|
||||||
|
|
||||||
set_stack() {
|
|
||||||
STACK=$(cx stacks list | fzf)
|
|
||||||
APPLICATION=$(echo $STACK | cut -d ' ' -f1)
|
|
||||||
ENVIRONMENT=$(echo $STACK | cut -d ' ' -f2)
|
|
||||||
}
|
|
||||||
|
|
||||||
set_server() {
|
|
||||||
SERVER=$(cx servers list --stack $APPLICATION --environment $ENVIRONMENT | fzf | cut -d ' ' -f1)
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $# -eq 0 ]] ; then
|
|
||||||
echo "No arguments given. Use -h for help."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $1 = "ssh" ]] ; then
|
|
||||||
cx_ssh
|
|
||||||
elif [[ $1 = "log" ]] ; then
|
|
||||||
LOG_FILE=$2
|
|
||||||
ROLE=$3
|
|
||||||
cx_log
|
|
||||||
fi
|
|
||||||
|
|
||||||
popd
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
require 'active_support/core_ext/string/inflections'
|
|
||||||
|
|
||||||
file = "/home/tsv/foxsoft/directors-uk/clapboard/app/models/concerns/progress_countries.rb"
|
|
||||||
|
|
||||||
File.open(file, "r+") do |f|
|
|
||||||
while(line = f.gets) != nil
|
|
||||||
m = line.match /\s\[\"(?<country>[\w\s\:\&\'\-\;\(\)]*)\".*\]/
|
|
||||||
puts line.gsub(m[:country], m[:country].titlecase) if m
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,72 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Best practice options
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
|
|
||||||
|
|
||||||
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
|
|
||||||
echo 'Usage:
|
|
||||||
'
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
INPUT_DIR=~/notes/site
|
|
||||||
OUTPUT_DIR=~/public_html
|
|
||||||
|
|
||||||
pushd ~
|
|
||||||
|
|
||||||
# Recursively iterate over directories, calling process_file on .md files
|
|
||||||
traverse_dir() {
|
|
||||||
local dir=$1
|
|
||||||
local depth=$2
|
|
||||||
for d in $dir; do
|
|
||||||
OUTPUT=$OUTPUT_DIR${d##$INPUT_DIR}
|
|
||||||
if [ -d "$d" ]; then
|
|
||||||
mkdir -p $OUTPUT
|
|
||||||
traverse_dir "$d/*" $((depth+1))
|
|
||||||
elif [[ $d == *.md ]]; then
|
|
||||||
OUTPUT=${OUTPUT%.md}.html
|
|
||||||
process_file "$d" "$OUTPUT" $depth
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# Take a Markdown file and process it to HTML
|
|
||||||
process_file() {
|
|
||||||
local INPUT=$1
|
|
||||||
local OUTPUT=$2
|
|
||||||
local depth=$3
|
|
||||||
local TITLE=${INPUT%.md}
|
|
||||||
TITLE=${TITLE##*/}
|
|
||||||
if [ "$TITLE" == 'index' ]; then
|
|
||||||
TITLE='Home'
|
|
||||||
fi
|
|
||||||
pandoc -f markdown -t html -o "$OUTPUT" -i "$INPUT" --standalone --template ~/code/site/template.html --variable=pagetitle:"$TITLE"
|
|
||||||
replace_links "$OUTPUT" $depth
|
|
||||||
}
|
|
||||||
|
|
||||||
# Replace links in Markdown files with working links to the new HTML files
|
|
||||||
replace_links() {
|
|
||||||
local FILE=$1
|
|
||||||
local depth=$2
|
|
||||||
# Add .html extensions
|
|
||||||
sed -Ei.bak '/https|\.[a-z]+/!s/href="[^"]*/&.html/' "$FILE"
|
|
||||||
if [ "$depth" -gt 0 ]; then
|
|
||||||
local path=$(for each in $(seq 1 $depth); do printf "..\/"; done)
|
|
||||||
local href="${path}style.css"
|
|
||||||
sed -i "s/href='style.css'/href='${href}'/g" "$FILE"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_files() {
|
|
||||||
cp -r ~/code/site/assets/ ~/public_html/
|
|
||||||
cp ~/code/site/style.css ~/public_html
|
|
||||||
}
|
|
||||||
|
|
||||||
traverse_dir $INPUT_DIR/\* 0
|
|
||||||
setup_files
|
|
||||||
rsync -arz ~/public_html/* -e ssh tsv@kernighan:/var/www/tsvallender.co.uk
|
|
||||||
|
|
||||||
popd
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Best practice options
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
|
|
||||||
|
|
||||||
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
|
|
||||||
echo 'Usage:
|
|
||||||
'
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
pushd ~
|
|
||||||
|
|
||||||
[ -d ~/sshfs/obs ] || mkdir -p ~/sshfs/obs
|
|
||||||
sshfs obs:/srv/salt ~/sshfs/obs
|
|
||||||
pushd ~/sshfs/obs
|
|
||||||
nvim
|
|
||||||
umount ~/sshfs/obs
|
|
||||||
popd
|
|
||||||
popd
|
|
18
startup.bash
18
startup.bash
|
@ -1,18 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Best practice options
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
|
|
||||||
|
|
||||||
|
|
||||||
main() {
|
|
||||||
keyctl link @us @s
|
|
||||||
Hyprland
|
|
||||||
}
|
|
||||||
|
|
||||||
pushd ~
|
|
||||||
main "$@"
|
|
||||||
popd
|
|
||||||
|
|
94
tmp.html
94
tmp.html
|
@ -1,94 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
|
||||||
<meta name="author" content="Trevor Vallender">
|
|
||||||
<meta name="description" content="Personal site of Trevor Vallender, software engineer">
|
|
||||||
<title>index | T S Vallender</title>
|
|
||||||
<link rel="stylesheet" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<h1>T S Vallender</h1>
|
|
||||||
<h4>Software Engineer, nerd, maker and dad.</h4>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
<h2 id="learning-plan"><a href="Learning%20plan">Learning
|
|
||||||
plan</a></h2>
|
|
||||||
<h2 id="foxsoft-todo">Foxsoft Todo</h2>
|
|
||||||
<ul class="incremental" class="task-list">
|
|
||||||
<li><input type="checkbox" disabled="" />Set up devenv on OxEd</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Solve <a
|
|
||||||
href="https://github.com/bobvanderlinden/nixpkgs-ruby/issues/6">SSL
|
|
||||||
issue</a></li>
|
|
||||||
<li><input type="checkbox" disabled="" />Use pgcli</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Create CI command</li>
|
|
||||||
<li><input type="checkbox" disabled="" />SLA Redmine script</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Git changelog script</li>
|
|
||||||
</ul>
|
|
||||||
<h2 id="personal-todo">Personal Todo</h2>
|
|
||||||
<ul class="incremental">
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Secure email
|
|
||||||
passwords and commit accounts to repo</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Fix issues with aerc (w3m
|
|
||||||
links/images, non-clickable links in kitty)</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Set up tmux
|
|
||||||
pairing nicely</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Set up tmux
|
|
||||||
keybindings</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Move NixOS
|
|
||||||
config to Flakes</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Set up
|
|
||||||
Hyprland</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Solve Neovim
|
|
||||||
vimwiki errors</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Move from gitea to standard
|
|
||||||
git UI</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Fix note
|
|
||||||
sync</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Fix photo sync issues</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Set up separate hosts
|
|
||||||
correctly in Nix config</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Move kernighan to nix</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Fix personal site</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Compile vimwiki notes
|
|
||||||
automatically</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Move
|
|
||||||
HomeAssistant Pi to other case</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Fix
|
|
||||||
HomeAssistant lighting</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Download all
|
|
||||||
audiobooks</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Set up ‘routine’
|
|
||||||
script</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Look into
|
|
||||||
folder-per-branch</li>
|
|
||||||
<li>Finish Hyprland setup</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Wallpaper per-desktop
|
|
||||||
https://github.com/hyprwm/hyprpaper</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Codeium
|
|
||||||
https://github.com/jcdickinson/codeium.nvim/issues/18</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Set up Compose
|
|
||||||
key</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Dunst
|
|
||||||
notifications</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Screenshots</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Persist network
|
|
||||||
connection</li>
|
|
||||||
<li><input type="checkbox" disabled="" checked="" />Try out
|
|
||||||
qutebrowser</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Set up Pass password
|
|
||||||
manager</li>
|
|
||||||
<li><input type="checkbox" disabled="" />Integrate pass with
|
|
||||||
qutebrowser</li>
|
|
||||||
</ul>
|
|
||||||
<h2 id="notes">Notes</h2>
|
|
||||||
<ul class="incremental">
|
|
||||||
<li><a href="Wishlist">Wishlist</a></li>
|
|
||||||
<li><a href="Stop%20branching">Stop branching</a></li>
|
|
||||||
<li><a href="Oxed%20Estimates">OxEd Estimates</a></li>
|
|
||||||
</ul>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -9,7 +9,7 @@ if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
|
||||||
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
|
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
|
||||||
echo 'Usage:
|
echo 'Usage:
|
||||||
tp new Start a new tmux session (unshared)
|
tp new Start a new tmux session (unshared)
|
||||||
tp sharero Share an existing session (read-only)
|
tp share Share an existing session (read-only)
|
||||||
tp sharew Share an existing session (write-access)
|
tp sharew Share an existing session (write-access)
|
||||||
tp unshare Remove share from existing session
|
tp unshare Remove share from existing session
|
||||||
'
|
'
|
||||||
|
@ -55,7 +55,7 @@ fi
|
||||||
if [[ $1 = "new" || $1 = "n" ]] ; then
|
if [[ $1 = "new" || $1 = "n" ]] ; then
|
||||||
new_session
|
new_session
|
||||||
elif [[ $1 = "sharero" || $1 = "sro" ]] ; then
|
elif [[ $1 = "sharero" || $1 = "sro" ]] ; then
|
||||||
share_ro_session
|
share_session
|
||||||
elif [[ $1 = "sharew" || $1 = "srw" ]] ; then
|
elif [[ $1 = "sharew" || $1 = "srw" ]] ; then
|
||||||
share_rw_session
|
share_rw_session
|
||||||
elif [[ $1 = "unshare" ]] ; then
|
elif [[ $1 = "unshare" ]] ; then
|
||||||
|
|
Loading…
Reference in New Issue