Skip to content

Instantly share code, notes, and snippets.

git config --global user.name= git config --global user.email= git config --global core.editor=vim

git init Initialize directory for git repo git add Add files to staging git add . Adds all files to staging git commit -m "message" Commit staged changes git commit --amend Amend last commit

@cactaceae21
cactaceae21 / Debian.md
Last active January 7, 2022 15:08
Linux New Systems

Debian mods

Install "ssh" and "standard system utilities" only

Vim

apt install -y vim vim-runtime
echo -e "colorscheme murphy\nsyntax on" > .vimrc

Utils

@cactaceae21
cactaceae21 / jq.md
Created June 24, 2021 08:59
JSON Data #json #jq

Queries

@cactaceae21
cactaceae21 / install.md
Last active July 13, 2021 10:08
MacigMirror #mm #fun

Magic Mirror configs

Ubuntu 20.04 Minimal ubuntu-20.04.2-preinstalled-server-arm64+raspi.img.xz

default user: ubuntu/ubuntu

useradd -m -s /bin/bash mm2

@cactaceae21
cactaceae21 / information.md
Created July 2, 2020 13:05
RasPi #linux #raspi

APT Update error pi@raspberrypi:~ $ sudo apt update Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB] Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB] Reading package lists... Done E: Release file for http://archive.raspberrypi.org/debian/dists/buster/InRelease is not valid yet (invalid for another 35d 1h 41min 5s). Updates for this repository will not be applied. E: Release file for http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease is not valid yet (invalid for another 36d 2h 53min 12s). Updates for this repository will not be applied.

pi@raspberrypi:~ $ sudo apt-get update --allow-releaseinfo-change

@cactaceae21
cactaceae21 / Certificates.md
Last active May 20, 2021 11:50
Crypto #crypto #encryption #hash #cert #certificate

Creating a certificate

RSA 4096 algorithm with SHA256 - will request subject details
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365

RSA 1024 algorithm with SHA1 - forcing just the Subject name without input
openssl req -x509 -newkey rsa:1024 -sha1 -keyout key.pem -out cert.pem -days 365 --subj "/CN=server"

Remove key password

openssl rsa -in original.key -out new.key

@cactaceae21
cactaceae21 / One_Liners.md
Last active April 26, 2024 10:23
Windows Tips #windows
  • Get all network adapter details wmic nic get AdapterType, Name, Installed, MACAddress, PowerManagementSupported, Speed

  • Reset WSL password