From 976d60d506f70ee7ff916079c434290482c22f5a Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 2 Jun 2023 08:42:17 -0500 Subject: moved a few things around --- tech/psql dump and restore.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tech/psql dump and restore.txt (limited to 'tech') diff --git a/tech/psql dump and restore.txt b/tech/psql dump and restore.txt new file mode 100644 index 0000000..92dc15d --- /dev/null +++ b/tech/psql dump and restore.txt @@ -0,0 +1,11 @@ +psql back up and restore + +Backup: + + $ pg_dump -U {user-name} -hlocalhost -d {source_db} > {dumpfilename.sql} + +Restore: + + $ psql -U {user-name} -hlocalhost -d {desintation_db} < {dumpfilename.sql} + + -- cgit v1.2.3 From e00cf4b1ea26d1a2f9a23a60c9af6f9ec9dab6fa Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 2 Jun 2023 08:50:55 -0500 Subject: fixed permissions on notes --- tech/debian 7 digital ocean running slowly.txt | 0 tech/django-comment-app-features.txt | 0 tech/how to downsize images and keep them sharp.txt | 0 tech/lhp book publishing tools.txt | 0 tech/lhp idea book on writing with vim.txt | 0 tech/lx link to header image.txt | 0 tech/minimal debian install.txt | 0 tech/script pandoc convert html to markdown.txt | 0 tech/set up debian droplet python 3 + gunicorn + supervisor.txt | 0 tech/set up geodjango on debian 7 digital ocean.txt | 0 tech/use mutt and gnome keyring.txt | 0 11 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tech/debian 7 digital ocean running slowly.txt mode change 100755 => 100644 tech/django-comment-app-features.txt mode change 100755 => 100644 tech/how to downsize images and keep them sharp.txt mode change 100755 => 100644 tech/lhp book publishing tools.txt mode change 100755 => 100644 tech/lhp idea book on writing with vim.txt mode change 100755 => 100644 tech/lx link to header image.txt mode change 100755 => 100644 tech/minimal debian install.txt mode change 100755 => 100644 tech/script pandoc convert html to markdown.txt mode change 100755 => 100644 tech/set up debian droplet python 3 + gunicorn + supervisor.txt mode change 100755 => 100644 tech/set up geodjango on debian 7 digital ocean.txt mode change 100755 => 100644 tech/use mutt and gnome keyring.txt (limited to 'tech') diff --git a/tech/debian 7 digital ocean running slowly.txt b/tech/debian 7 digital ocean running slowly.txt old mode 100755 new mode 100644 diff --git a/tech/django-comment-app-features.txt b/tech/django-comment-app-features.txt old mode 100755 new mode 100644 diff --git a/tech/how to downsize images and keep them sharp.txt b/tech/how to downsize images and keep them sharp.txt old mode 100755 new mode 100644 diff --git a/tech/lhp book publishing tools.txt b/tech/lhp book publishing tools.txt old mode 100755 new mode 100644 diff --git a/tech/lhp idea book on writing with vim.txt b/tech/lhp idea book on writing with vim.txt old mode 100755 new mode 100644 diff --git a/tech/lx link to header image.txt b/tech/lx link to header image.txt old mode 100755 new mode 100644 diff --git a/tech/minimal debian install.txt b/tech/minimal debian install.txt old mode 100755 new mode 100644 diff --git a/tech/script pandoc convert html to markdown.txt b/tech/script pandoc convert html to markdown.txt old mode 100755 new mode 100644 diff --git a/tech/set up debian droplet python 3 + gunicorn + supervisor.txt b/tech/set up debian droplet python 3 + gunicorn + supervisor.txt old mode 100755 new mode 100644 diff --git a/tech/set up geodjango on debian 7 digital ocean.txt b/tech/set up geodjango on debian 7 digital ocean.txt old mode 100755 new mode 100644 diff --git a/tech/use mutt and gnome keyring.txt b/tech/use mutt and gnome keyring.txt old mode 100755 new mode 100644 -- cgit v1.2.3 From 073b8c2efce5c5a634d938d5ee86c836e22e3183 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 5 Jun 2023 08:53:59 -0500 Subject: tech: added some notes on git annex and a bash vi mode cheat sheet --- tech/bash-vi-editing-mode-cheat-sheet.txt | 165 ++++++++++++++++++++++++++++++ tech/git-annex-photo-workflow.txt | 36 +++++++ 2 files changed, 201 insertions(+) create mode 100644 tech/bash-vi-editing-mode-cheat-sheet.txt create mode 100644 tech/git-annex-photo-workflow.txt (limited to 'tech') diff --git a/tech/bash-vi-editing-mode-cheat-sheet.txt b/tech/bash-vi-editing-mode-cheat-sheet.txt new file mode 100644 index 0000000..8466cff --- /dev/null +++ b/tech/bash-vi-editing-mode-cheat-sheet.txt @@ -0,0 +1,165 @@ +.--------------.------------------------------------------------------------. +| | | +| Shortcut | Description | +| | | +'--------------'------------------------------------------------------------' +| Switching to COMMAND Mode: | +'--------------.------------------------------------------------------------' +| ESC | Switch to command mode. | +'--------------'------------------------------------------------------------' +| Commands for Entering INPUT Mode: | +'--------------.------------------------------------------------------------' +| i | Insert before cursor. | +'--------------+------------------------------------------------------------' +| a | Insert after cursor. | +'--------------+------------------------------------------------------------' +| I | Insert at the beginning of line. | +'--------------+------------------------------------------------------------' +| A | Insert at the end of line. | +'--------------+------------------------------------------------------------' +| c | Change text of a movement command (see below). | +'--------------+------------------------------------------------------------' +| C | Change text to the end of line (equivalent to c$). | +'--------------+------------------------------------------------------------' +| cc or S | Change current line (equivalent to 0c$). | +'--------------+------------------------------------------------------------' +| s | Delete a single character under the cursor and enter input | +| | mode (equivalent to c[SPACE]). | +'--------------+------------------------------------------------------------' +| r | Replaces a single character under the cursor (without | +| | leaving command mode). | +'--------------+------------------------------------------------------------' +| R | Replaces characters under cursor. | +'--------------+------------------------------------------------------------' +| v | Edit (and execute) the current command in the text editor. | +| | (an editor defined in $VISUAL or $EDITOR variables, or vi | +'--------------'------------------------------------------------------------' +| Basic Movement Commands (in command mode): | +'--------------.------------------------------------------------------------' +| h | Move one character right. | +'--------------+------------------------------------------------------------' +| l | Move one character left. | +'--------------+------------------------------------------------------------' +| w | Move one word or token right. | +'--------------+------------------------------------------------------------' +| b | Move one word or token left. | +'--------------+------------------------------------------------------------' +| W | Move one non-blank word right. | +'--------------+------------------------------------------------------------' +| B | Move one non-blank word left. | +'--------------+------------------------------------------------------------' +| e | Move to the end of the current word. | +'--------------+------------------------------------------------------------' +| E | Move to the end of the current non-blank word. | +'--------------+------------------------------------------------------------' +| 0 | Move to the beginning of line | +'--------------+------------------------------------------------------------' +| ^ | Move to the first non-blank character of line. | +'--------------+------------------------------------------------------------' +| $ | Move to the end of line. | +'--------------+------------------------------------------------------------' +| % | Move to the corresponding opening/closing bracket. | +'--------------'------------------------------------------------------------' +| Character Finding Commands (these are also Movement Commands): | +'--------------.------------------------------------------------------------' +| fc | Move right to the next occurance of char c. | +'--------------+------------------------------------------------------------' +| Fc | Move left to the previous occurance of c. | +'--------------+------------------------------------------------------------' +| tc | Move right to the next occurance of c, then one char | +| | backward. | +'--------------+------------------------------------------------------------' +| Tc | Move left to the previous occurance of c, then one char | +| | forward. | +'--------------+------------------------------------------------------------' +| ; | Redo the last character finding command. | +'--------------+------------------------------------------------------------' +| , | Redo the last character finding command in opposite | +| | direction. | +'--------------+------------------------------------------------------------' +| | | Move to the n-th column (you may specify the argument n by | +| | typing it on number keys, for example, 20|) | +'--------------'------------------------------------------------------------' +| Deletion Commands: | +'--------------.------------------------------------------------------------' +| x | Delete a single character under the cursor. | +'--------------+------------------------------------------------------------' +| X | Delete a character before the cursor. | +'--------------+------------------------------------------------------------' +| d | Delete text of a movement command (see above). | +'--------------+------------------------------------------------------------' +| D | Delete to the end of the line (equivalent to d$). | +'--------------+------------------------------------------------------------' +| dd | Delete current line (equivalent to 0d$). | +'--------------+------------------------------------------------------------' +| CTRL-w | Delete the previous word. | +'--------------+------------------------------------------------------------' +| CTRL-u | Delete from the cursor to the beginning of line. | +'--------------'------------------------------------------------------------' +| Undo, Redo and Copy/Paste Commands: | +'--------------.------------------------------------------------------------' +| u | Undo previous text modification. | +'--------------+------------------------------------------------------------' +| U | Undo all previous text modifications. | +'--------------+------------------------------------------------------------' +| . | Redo the last text modification. | +'--------------+------------------------------------------------------------' +| y | Yank a movement into buffer (copy). | +'--------------+------------------------------------------------------------' +| yy | Yank the whole line. | +'--------------+------------------------------------------------------------' +| p | Insert the yanked text at the cursor. | +'--------------+------------------------------------------------------------' +| P | Insert the yanked text before the cursor. | +'--------------'------------------------------------------------------------' +| Commands for Command History: | +'--------------.------------------------------------------------------------' +| k | Insert the yanked text before the cursor. | +'--------------+------------------------------------------------------------' +| j | Insert the yanked text before the cursor. | +'--------------+------------------------------------------------------------' +| G | Insert the yanked text before the cursor. | +'--------------+------------------------------------------------------------' +| /string or | Search history backward for a command matching string. | +| CTRL-r | | +'--------------+------------------------------------------------------------' +| ?string or | Search history forward for a command matching string. | +| CTRL-s | (Note that on most machines Ctrl-s STOPS the terminal | +| | output, change it with `stty' (Ctrl-q to resume)). | +'--------------+------------------------------------------------------------' +| n | Repeat search in the same direction as previous. | +'--------------+------------------------------------------------------------' +| N | Repeat search in the opposite direction as previous. | +'--------------'------------------------------------------------------------' +| Completion commands: | +'--------------.------------------------------------------------------------' +| TAB or = or | List all possible completions. | +| CTRL-i | | +'--------------+------------------------------------------------------------' +| * | Insert all possible completions. | +'--------------'------------------------------------------------------------' +| Miscellaneous commands: | +'--------------.------------------------------------------------------------' +| ~ | Invert case of the character under cursor and move a | +| | character right. | +'--------------+------------------------------------------------------------' +| # | Prepend '#' (comment character) to the line and send it to | +| | the history. | +'--------------+------------------------------------------------------------' +| _ | Inserts the n-th word of the previous command in the | +| | current line. | +'--------------+------------------------------------------------------------' +| 0, 1, 2, ... | Sets the numeric argument. | +'--------------+------------------------------------------------------------' +| CTRL-v | Insert a character literally (quoted insert). | +'--------------+------------------------------------------------------------' +| CTRL-r | Transpose (exchange) two characters. | +'--------------'------------------------------------------------------------' + + + =========================================================================== + +.---------------------------------------------------------------------------. +| Created by Peter Krumins (peter@catonmat.net, @pkrumins on twitter) | +| www.catonmat.net -- good coders code, great coders reuse | +'---------------------------------------------------------------------------' diff --git a/tech/git-annex-photo-workflow.txt b/tech/git-annex-photo-workflow.txt new file mode 100644 index 0000000..d429541 --- /dev/null +++ b/tech/git-annex-photo-workflow.txt @@ -0,0 +1,36 @@ +Git annex use in workflow - Software - discuss.pixls.us + +Setting up git-annex + +Create the repository and initialize it. +~$ cd ~/ +~$ mkdir Photographs +~$ cd Photographs +~$ git init +~$ git-annex init "My beautiful photographs" +Create a backup repository and initialize it. +~$ cd /media/external/ +~$ mkdir Photographs-backup +~$ cd Photographs-backup +~$ git init +~$ git-annex init "A backup of my beautiful photographs" +Let the repositories know about one another: +From ~/Photographs: +~$ git remote add backup /media/external/Photographs-backup +From /media/external/Photographs-backup: +~$ git remote add homedir ~/Photographs +Tell git-annex to keep multiple copies of your files. +~$ echo "*.nef annex.numcopies=2" >> .gitattributes +Tell git-annex to ignore XMP files so you can check them into git (requires git annex version 6.20160126). +~$ echo "*.xmp annex.largefiles=nothing" >> .gitattributes +Add some content. +~$ rsync -rvP --progress /media/camera/DCIM/ ~/Photographs/ +~$ cd ~/Photographs/ +~$ git-annex add . # note it isn't git add . +~$ git commit -m "Added photos from today's walk." +Sync the content between the repositories. +~$ cd ~/Photographs +~$ git-annex sync --content + + +visit site:https://discuss.pixls.us/t/git-annex-use-in-workflow/2028/7 -- cgit v1.2.3 From 52278502f255080ea0859f6e5761838f563f4610 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 6 Dec 2023 16:56:27 -0500 Subject: added some new recipes --- tech/arch-server-setup.txt | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 tech/arch-server-setup.txt (limited to 'tech') diff --git a/tech/arch-server-setup.txt b/tech/arch-server-setup.txt new file mode 100644 index 0000000..cb06e27 --- /dev/null +++ b/tech/arch-server-setup.txt @@ -0,0 +1,54 @@ +Arch on a Server? Madness. + +https://wiki.archlinux.org/title/installation_guide +https://www.linuxbabe.com/linux-server/install-arch-linux-on-kvm-vps + +Boot ISO and follow install instructions to get it working. + +verify bootmode: cat /sys/firmware/efi/fw_platform_size + +ip link + +ping archlinux.org + +timedatectl + +fdisk -l + +make a 1M partition for grub + +then install grub: pacman -S grub + +then: + +grub-install --target=i386-pc /dev/vda +then config: +grub-mkconfig -o /boot/grub/grub.cfg + +https://wiki.archlinux.org/title/GRUB + +## Networking +https://www.reddit.com/r/archlinux/comments/3yaw2x/network_failure_trying_to_set_static_ip/?rdt=35416 +https://wiki.archlinux.org/title/Systemd-networkd + + +then start systemd-networkd, create file: + +/etc/systemd/network/20-wired.network +[Match] +Name=enp0s3 # or whatever the interface is named + +[Network] +Address=10.1.10.9/24 +Gateway=10.1.10.1 +DNS=10.1.10.1 + +Then link in resov files + +ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf +systemctl --now enable systemd-resolved + +Then turn on networkd: +systemctl --now enable systemd-networkd + + -- cgit v1.2.3