Skip to content

Instantly share code, notes, and snippets.

@tech-otaku
tech-otaku / macbook.sh
Last active March 24, 2022 11:54
Ubuntu Desktop Configuration on MacBook Pro
#!/usr/bin/env bash
# Note: LOGIN SCREEN SCALE (200%), LOGIN SCREEN SIZE (1152x864) and DISPLAY SCALE (200%) below are dependant on
# Virtual Machine > Settings > Display > 'Use full resolution for Retina display' in VMware Fusion being checked
# (gui.fitGuestUsingNativeDisplayResolution = "TRUE" in .vmx file)
# Get the installed Ubuntu version e.g. 20, 18, 16 etc.
VERSION=$(lsb_release -r | awk '{print $2}' | cut -d '.' -f 1)
@tech-otaku
tech-otaku / requests_api.py
Created January 13, 2022 07:26 — forked from stefansundin/requests_api.py
Reusable class for Python requests library.
# http://docs.python-requests.org/en/master/api/
import requests
class RequestsApi:
def __init__(self, base_url, **kwargs):
self.base_url = base_url
self.session = requests.Session()
for arg in kwargs:
if isinstance(kwargs[arg], dict):
kwargs[arg] = self.__deep_merge(getattr(self.session, arg), kwargs[arg])
@tech-otaku
tech-otaku / visual-studio-code-vscodium-directory-and-file-name-comparison.md
Created January 9, 2022 08:33
Visual Studio Code / VSCodium directory and file name comparison.
Visual Studio Code VSCodium
/Applications/Visual Studio Code.app /Applications/VSCodium.app
$HOME/.vscode $HOME/.vscode-oss
$HOME/Library/Application Support/Code $HOME/Library/Application Support/VSCodium
$HOME/Library/Preferences/com.microsoft.VSCode.plist $HOME/Library/Preferences/com.visualstudio.code.oss.plist
/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code /Applications/VSCodium.app/Contents/Resources/app/bin/codium`
@tech-otaku
tech-otaku / here-document.md
Created January 9, 2022 08:21
Expanding variables in a *nix shell 'here document' (heredoc).
Command:
cat << EOF
$USER 
$HOME
EOF
Output: