Skip to content

Instantly share code, notes, and snippets.

@ishad0w
ishad0w / oci_ubuntu_to_debian.multiarch.sh
Last active May 31, 2024 21:15
Debian 12 on Oracle Cloud (Free Tier) - (AMD64/ARM64)
#!/bin/bash
echo -e "\nHost:"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -p 22 ubuntu@$1 \
'uname -a && arch && uptime && sudo touch /home/ubuntu/.hushlogin /root/.hushlogin'
echo -e "\nAdding temporary SSH-key for Ubuntu root user..."
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -p 22 ubuntu@$1 \
'sudo cat /home/ubuntu/.ssh/authorized_keys | sudo tee /root/.ssh/authorized_keys'
echo -e "\nSystem trimming..."
@lucis
lucis / fetch-and-parse.js
Created August 13, 2019 19:56
Fetchs a ISO-8859-1 HTML page and parse it
const fetchAndParse = url => fetch(url)
.then(response => response.arrayBuffer())
.then(buffer => { const decoder = new TextDecoder("ISO-8859-1"); return decoder.decode(buffer) })
.then(content => { const parser = new DOMParser(); return parser.parseFromString(content, 'text/html') })
// I'll probably improve it later in the matter of compatibility
@markus-willems
markus-willems / xubuntu-natural-scrolling.md
Created January 3, 2019 19:23
Enable natural scrolling in Xubuntu 18.04.1

Enable natural scrolling in Xubuntu 18.04.1

  1. Uncheck Reverse scroll direction in Settings > Mouse and Touchpad
  2. Open Terminal and enter sudo mousepad /usr/share/X11/xorg.conf.d/70-synaptics.conf
  3. Append the following snippet:
Section "InputClass"
    Identifier "touchpad"
    Driver "synaptics"
 MatchIsTouchpad "on"