Skip to content

Instantly share code, notes, and snippets.

@hyperupcall
hyperupcall / settings.jsonc
Last active July 5, 2024 20:20
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@maixuanhan
maixuanhan / install-ubuntu-server-via-console.md
Last active April 6, 2023 06:41
Install Ubuntu server 18.04 via USB disk and serial console
@kaxing
kaxing / lxc-loop-device.note.md
Last active October 24, 2022 01:27
Mount Image file or loop device inside lxc container
@mpontillo
mpontillo / maas-cli-commands.sh
Last active November 23, 2023 16:10
MAAS jq tricks and how to move interfaces between fabrics (via changing the interface's VLAN)
maas refresh
profile=$(maas list | head -1 | awk '{ print $1 }')
# This generates a single JSON object.
maas $PROFILE machines read | jq '[.[] | {hostname:.hostname, system_id: .system_id, status:.status}]'
...
maas $PROFILE machines read | jq '.[] | {hostname:.hostname, system_id: .system_id, status:.status}' --compact-output
{"hostname":"pxe-bond1","system_id":"xrey6h","status":4}
@mietek
mietek / set-up-l2tp-ipsec-vpn-on-debian.md
Last active October 22, 2023 12:25
Set up L2TP/IPsec VPN on Debian

Set up L2TP/IPsec VPN on Debian

Set up IPsec

Set up networking

# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@geoffb
geoffb / simple_websocket_client.html
Created October 7, 2010 23:37
Super simple websockets client/server using Python. Compatible with the draft 76 challenge/response.
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>