Skip to content

Instantly share code, notes, and snippets.

View jstenmark's full-sized avatar

Johannes Stenmark jstenmark

View GitHub Profile
@jstenmark
jstenmark / multiple_ssh_setting.md
Created July 5, 2024 20:20 — forked from RomuloOliveira/multiple_ssh_setting.md
Configure multiple git accounts on same computer using ssh

Multiple SSH Keys settings for different github account

Create different public key

Create different ssh key according the article Generating SSH keys.

Example:

@jstenmark
jstenmark / pågen.py
Created February 6, 2024 21:28
password generator
def extract_service_identifier(url):
# Extract the domain name from the URL, removing any 'www.' prefix and TLD
if "://" in url:
domain = url.split("://")[1].split("/")[0]
else:
domain = url.split("/")[0]
domain = domain.replace("www.", "").split(".")[0]
# Incorporate 'ö' by replacing the first occurrence of 'o' or appending it
if 'o' in domain:
@jstenmark
jstenmark / data.js
Created December 3, 2023 19:45
Muliline replacer
const resourceIds = [
{ oldWord: 'customer_id', newWord: 'customerId' },
{ oldWord: 'ticket_id', newWord: 'ticketId' },
{ oldWord: 'switch_id', newWord: 'switchId' },
{ oldWord: 'access_id', newWord: 'accessId' },
@jstenmark
jstenmark / Boot Into LiveCD from Grub
Created August 29, 2019 11:57 — forked from carlitoplatanito/Boot Into LiveCD from Grub
Boot into a LiveCD from Grub when bootable CD or USB is broken on old PC
grub> ls
# (hd0) (hd0,msdos5) (hd1) (hd1,msdos0)
grub> linux (hd1,msdos1)/install/vmlinuz root=/dev/sdb1
grub> initrd (hd1,msdos1)/install/initrd.gz
grub> boot