Skip to content

Instantly share code, notes, and snippets.

View projectoperations's full-sized avatar

projectoperations projectoperations

View GitHub Profile
{
"editor.cursorWidth": 4,
"liveServer.settings.host": "192.168.1.69",
"explorer.confirmDelete": false,
"terminal.integrated.fontWeight": "500",
"terminal.integrated.letterSpacing": 1,
"terminal.integrated.fontWeightBold": "900",
"terminal.integrated.gpuAcceleration": "off",
"editor.fontFamily": " 'Consolas', 'Courier New', monospace, monospace",
"editor.fontLigatures": true,
@projectoperations
projectoperations / instructions.md
Created January 3, 2025 09:24 — forked from zentralwerkstatt/instructions.md
Shared folder on Linux
  • Add user with home directory: sudo useradd -m username
  • As user, change default shell: chsh -s /bin/bash
  • Set temp. password: sudo passwd username
  • Create group: sudo groupadd groupname
  • Add users: usermod -a -G groupname username
  • Make shared directory: sudo mkdir /home/groupname
  • Set group for shared directory: sudo chgrp groupname /home/groupname
  • Add write access for group: sudo chmod g+w /home/groupname
  • "Set GID" for group (all files created owned by group): sudo chmod 2775 /home/groupname
  • Change to different user to test: su - username
@projectoperations
projectoperations / brew_install.sh
Created January 3, 2025 06:04 — forked from m1yag1/brew_install.sh
Bash script for installing homebrew
#!/usr/bin/env bash
# This is part of a larger script for setting a mac for python development.
set -e
# Shared functions
pretty_print() {
printf "\n%b\n" "$1"
}
@projectoperations
projectoperations / COPYRIGHT_NOTICE_TEMPLATES.md
Created January 2, 2025 16:44 — forked from jaredrummler/COPYRIGHT_NOTICE_TEMPLATES.md
Copyright templates for Intellij IDEA
@projectoperations
projectoperations / README.md
Created January 2, 2025 16:19 — forked from jikuja/README.md
Azure icon collections

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
@projectoperations
projectoperations / wget-download-site.sh
Created January 1, 2025 11:41 — forked from jasperf/wget-download-site.sh
Use wget to get a local copy of a site with all files and folders . This an ideal way to clone a (static html/css/javascript based ) site from the command line. #copy #clone #wget #download
#http://stackoverflow.com/questions/6348289/download-a-working-local-copy-of-a-webpage
#http://stackoverflow.com/questions/8755229/how-to-download-all-file-from-website-using-wget
#http://stackoverflow.com/questions/4272770/wget-with-authentication?rq=1
#add browser headers:
#--header="Accept: text/html" --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/30.0"
#add .htaccess authentication details:
#--password=password --user=user
wget -m -p -E -k -K -np http://site/path/
wget -p -k http://ExampleSite.com
# and another via Quora https://www.quora.com/How-do-you-export-a-WordPress-site-to-a-static-HTML
@projectoperations
projectoperations / wget.sh
Created January 1, 2025 11:34 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
services:
hub:
image: 'jetbrains/hub:2020.1.12722'
container_name: 'hub'
restart: unless-stopped
security_opt:
- no-new-privileges:true
environment:
- PUID=13001
#!/bin/bash
DIST_BASE="ubuntu"
apt update
apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/$DIST_BASE/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88