## Unstage files
git restore --staged .
## Change last commit message (1st one will open editor)
git commit --amend
git commit --amend -m "New commit message"
## Add another repo in existing
# vim
sudo apt install vim curl wget git xz-utils
Install nix package manager (https://github.com/NixOS/nix)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Import(FROM) / Export(TO) CSV file from/into a table | |
-- Ref: https://www.postgresql.org/docs/current/sql-copy.html | |
-- If processing all columns, no need column specification | |
-- If CSV file don't include header, remove 'HEADER' from below query | |
-- For Export, can also specify Query, instead of Table & Column name | |
COPY table_name (column_1, column_2, column_3, column_5) | |
[FROM/TO] 'csv_file_location' DELIMITER ',' CSV HEADER QUOTE '"' ESCAPE '"' | |
-- Dump database on remote host to file | |
-- Ref: https://www.postgresql.org/docs/current/app-pgdump.html |
At first buy a Raspberry Pi (I recommend Zero edition for minimum cost) with casing (official one is enough for Zero). My configuration:
- Rapberry Pi Zero with Official Casing (used the Cover with Center Hole)
- MicroSD card
- Micro-USB to LAN converter (can be replaced with OTG Cable + USB to LAN converter)
- Micro-USB power cable
- LAN connection cable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Spider Websites with Wget – 20 Practical Examples | |
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute. | |
1. Download a single file from the Internet | |
wget http://example.com/file.iso | |
2. Download a file but save it locally under a different name | |
wget ‐‐output-document=filename.html example.com |