Compare commits

..

No commits in common. "9dc6756eff3df772191ddc982604df69be3737cd" and "d12079ff73b6f7ed0f74a9e98ebcac533c36c554" have entirely different histories.

2 changed files with 9 additions and 50 deletions

View File

@ -18,15 +18,15 @@ Now you can just connect using ssh \$HOST_NAME
```sh ```sh
# Remove every images # Remove every images
docker images --format='{{.ID}}' | xargs docker rmi docker images --format="{{.ID}}" | xargs docker rmi
# Remove every containers # Remove every containers
docker ps -a --format='{{.ID}}' | xargs docker stop | xargs docker rm docker ps -a --format="{{.ID}}" | xargs docker stop | xargs docker rm
# Remove every volumes # Remove every volumes
docker volume ls --format='{{.Name}}' | xargs docker volume rm docker volume ls --format="{{.Name}}" | xargs docker volume rm
# Remove every anonymous images (cached) # Remove every anonymous images (cached)
docker images --format='{{.Repository}};{{.Tag}};{{.ID}}' | grep '<none>;<none>' | cut -d ';' -f 3 | xargs docker rmi docker images --format="{{.Repository}};{{.Tag}};{{.ID}}" | grep "<none>;<none>" | cut -d";" -f 3 | xargs docker rmi
# Get all used images tag in dir $PATH_ANALYSE # Get all used images tag in dir $PATH_ANALYSE
find $PATH_ANALYSE -name 'Dockerfile*' | while read file; do cat $file; echo ''; done | grep -e FROM | cut -d ' ' -f 2 | sed $'s/[^[:print:]\t]//g' | sort -u | xargs -n1 docker pull find $PATH_ANALYSE -name "Dockerfile*" | while read file; do cat $file; echo ""; done | grep -e FROM | cut -d " " -f 2 | sed $'s/[^[:print:]\t]//g' | sort -u | xargs -n1 docker pull
# Calculate total docker images size # Calculate total docker images size
docker images --format {{.ID}} | xargs -n1 docker inspect | jq '.[0]["Size"]' | paste -sd + | bc | format_bytes_str docker images --format {{.ID}} | xargs -n1 docker inspect | jq '.[0]["Size"]' | paste -sd + | bc | format_bytes_str
``` ```
@ -35,7 +35,7 @@ docker images --format {{.ID}} | xargs -n1 docker inspect | jq '.[0]["Size"]' |
```R ```R
my_packages = as.data.frame(installed.packages()[, c(1, 3:4)]) my_packages = as.data.frame(installed.packages()[, c(1, 3:4)])
my_packages = my_packages[my_packages$Priority != 'base',] my_packages = my_packages[my_packages$Priority != "base",]
for(lib in .libPaths()) lapply(my_packages$Package, remove.packages, lib = lib) for(lib in .libPaths()) lapply(my_packages$Package, remove.packages, lib = lib)
``` ```
@ -43,8 +43,8 @@ for(lib in .libPaths()) lapply(my_packages$Package, remove.packages, lib = lib)
```sh ```sh
# Generate a SSH key pair # Generate a SSH key pair
ssh-keygen -t rsa -b 4096 -o -a 100 -C 'email@example.com' -f ~/.ssh/$KEY_NAME ssh-keygen -t rsa -b 4096 -o -a 100 -C "email@example.com" -f ~/.ssh/$KEY_NAME
ssh-keygen -t ed25519 -a 100 -C 'email@example.com' -f ~/.ssh/$KEY_NAME ssh-keygen -t ed25519 -a 100 -C "email@example.com" -f ~/.ssh/$KEY_NAME
# Copy the public key to clipboard # Copy the public key to clipboard
cat ~/.ssh/$KEY_NAME.pub | xclip cat ~/.ssh/$KEY_NAME.pub | xclip
# Paste the contents into a new SSH key holder in https://github.com/settings/keys # Paste the contents into a new SSH key holder in https://github.com/settings/keys
@ -54,7 +54,7 @@ ssh -T git@github.com
git remote set-url origin git@github.com:username/your-repository.git git remote set-url origin git@github.com:username/your-repository.git
# Add key to SSH config file (~/.ssh/config) # Add key to SSH config file (~/.ssh/config)
echo -e "\n\nHost github.com\n\tIdentityFile ~/.ssh/$KEY_NAME" >> ~/.ssh/config echo -e "\n\nHost github.com\n\tIdentityFile ~/.ssh/$KEY_NAME" >> ~/.ssh/config
cat KEY_FILE | ssh REMOTE 'cat >> ~/.ssh/authorized_keys' cat KEY_FILE | ssh REMOTE "cat >> ~/.ssh/authorized_keys"
``` ```
## Font ligature test ## Font ligature test
@ -189,8 +189,3 @@ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3
```sh ```sh
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj '/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname' openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj '/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname'
``` ```
## Bind to port 80 or 443
[Is there a way for non-root processes to bind to "privileged" ports on Linux?](https://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-on-linux)
[Allow non-root process to bind to port 80 and 443?](https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443)

View File

@ -1,36 +0,0 @@
#!/bin/sh
set -e
echo 'Creating temporary working directory...'
rm -rf /tmp/proton-ge-custom
mkdir /tmp/proton-ge-custom
cd /tmp/proton-ge-custom
echo 'Getting ProtonGE metadata'
METADATA=$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4)
test -n "$METADATA"
# If result is not empty, continue
echo 'Fetching tarball URL...'
TARBALL_URL=$(echo "$METADATA" | grep .tar.gz)
TARBALL_NAME=$(basename "$TARBALL_URL")
echo "Downloading tarball: $TARBALL_NAME..."
curl -# -L "$TARBALL_URL" -o "$TARBALL_NAME" --no-progress-meter
echo 'Fetching checksum URL...'
CHECKSUM_URL=$(echo "$METADATA" | grep .sha512sum)
CHECKSUM_NAME=$(basename "$CHECKSUM_URL")
echo "Downloading checksum: $CHECKSUM_NAME..."
curl -# -L "$CHECKSUM_URL" -o "$CHECKSUM_NAME" --no-progress-meter
echo "Verifying tarball $TARBALL_NAME with checksum $CHECKSUM_NAME..."
sha512sum -c "$CHECKSUM_NAME"
# If result is ok, continue
echo 'Creating Steam directory if it does not exist...'
mkdir -p ~/.steam/root/compatibilitytools.d
echo "Extracting $TARBALL_NAME to Steam directory..."
tar -xf "$TARBALL_NAME" -C ~/.steam/root/compatibilitytools.d/
echo 'All done :)'