Skip to content

Instantly share code, notes, and snippets.

@tomdaley92
tomdaley92 / README.md
Last active October 15, 2024 19:12
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules mailutils
  2. Enable 2FA for the gmail account that will be used by going to security settings

@tomdaley92
tomdaley92 / README.md
Last active November 8, 2024 11:22
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@waimus
waimus / userChrome.css
Last active November 10, 2024 13:46
Firefox CSS tabs toolbar auto hide.
/* tab bar auto hide */
@-moz-document url(chrome://browser/content/browser.xul),
url(chrome://browser/content/browser.xhtml) {
/* show tabs toolbar when navigator-toolbox gets hovered */
#main-window:not([customizing]) #navigator-toolbox:hover #TabsToolbar {
visibility: visible !important;
opacity: 1 !important;
margin-bottom: 0px;
transition: visibility 0.1s linear, opacity 0.1s linear, margin-bottom 0.1s linear;

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@huytd
huytd / todo.vim
Created June 14, 2020 07:34
A Todo list syntax in Vim, with an actual checkbox
" Vim syntax file
" Language: Todo
" Maintainer: Huy Tran
" Latest Revision: 14 June 2020
if exists("b:current_syntax")
finish
endif
" Custom conceal
@Snarp
Snarp / google-docs-copy.js
Last active October 14, 2024 04:25
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@MrOtherGuy
MrOtherGuy / fx-css-variables.txt
Last active October 13, 2024 19:27
CSS variables used by Firefox
main-window
***********************
--arrowpanel-background
--arrowpanel-border-color
--arrowpanel-color
--arrowpanel-dimmed
--arrowpanel-dimmed-even-further
--arrowpanel-dimmed-further
--arrowpanel-padding
--autocomplete-popup-background
// ==UserScript==
// @name 新しいスクリプト 421815
// @version 1
// @match https://wiki.greasespot.net/GM.xmlHttpRequest
// @match http://example.com/
// @grant GM.xmlHttpRequest
// ==/UserScript==
function get(url) {
return new Promise(resolve => {
@bestrocker221
bestrocker221 / freeradius_password_hash_sha256_salt.py
Created March 17, 2019 18:01
SSHA2-256 FreeRadius password hashing
from hashlib import sha256
from base64 import b64encode, b64decode
# salt size = 12
SALT_SIZE = 12
def hashPassword(password, salt):
ctx = sha256(password)
ctx.update(salt)
@dcode
dcode / import_dod_certs_mac.sh
Last active August 29, 2024 06:22
Install and trust DoD CA certificates on Mac OS X. Tested on Catalina and Mojave. *NOTE*: This should also enable CAC if you didn't override the system drivers.
#!/bin/bash
set -eu -o pipefail
export CERT_URL='https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/unclass-certificates_pkcs7_DoD.zip'
# Download & Extract DoD root certificates
cd ~/Downloads/ || exit 1
/usr/bin/curl -LOJ "${CERT_URL}"