Skip to content

Instantly share code, notes, and snippets.

@AveYo
AveYo / 7-Zip_Windows11.reg
Last active May 12, 2024 18:46
7-Zip Windows 11 Context Menu entries via whitelisted id reuse example by AveYo
Windows Registry Editor Version 5.00
; 7-Zip Windows 11 Context Menu entries via whitelisted id reuse example by AveYo
; Add to archive.. only single files (multiple would need a single instance redirect tool)
[-HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\connectNetworkDrive]
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\connectNetworkDrive]
"MuiVerb"="@C:\\Program Files\\7-Zip\\7-zip.dll,-2324"
"Position"="Middle"
"Icon"="C:\\Program Files\\7-Zip\\7-zip.dll,0"
@rxaviers
rxaviers / gist:7360908
Last active May 12, 2024 18:45
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@dsevilla
dsevilla / min-bib.el
Created September 8, 2020 11:20
Emacs Lisp code to take a .bbl file and extract from a original .bib file only the used citations, and put that into a destination .bib file.
(defun min-bib (mainbbl origbib destbib)
(interactive "fMain .bbl file: \nfOriginal .bib file: \nFDestination .bib file (will be overwritten): \n")
(let ((matches)
(dest-buffer (find-file-noselect destbib)))
(with-current-buffer (find-file-noselect mainbbl)
(goto-char 1)
(while (search-forward-regexp "\\\\bibitem{\\(.*?\\)}" nil t 1)
(push (match-string-no-properties 1) matches)))
(with-current-buffer dest-buffer (erase-buffer))
(with-current-buffer (find-file-noselect origbib)
@zidenis
zidenis / 5_steps_for_creating_templates_and_vms_on_proxmox_using_linux_distros_cloud_images.md
Last active May 12, 2024 18:42
Creating Templates and Virtual Machines on Proxmox using cloud images from various Linux distributions.

5 Steps for Creating Templates and Virtual Machines on Proxmox using Linux Distro's Cloud Images

This tutorial guides you through the process of creating Templates and Virtual Machines on Proxmox using cloud-based images from various Linux distributions. We provide clear instructions for Alma Linux 9, Amazon Linux 2, CentOS 9, Fedora 38, Oracle Linux 9, RHEL 9, Rocky Linux 9, and Ubuntu 23.04 Lynx Lobster.

Note: The instructions have been tested on Proxmox 8.0.4.

Let's begin by choosing the cloud-based image. If you already have your preferred Linux distribution, skip to the 1st step.

To assist in making informed choices when selecting a Linux distribution for your virtual machines, we've compiled a table showcasing key characteristics of each cloud image. This table provides a snapshot of important attributes, including kernel version, Python version, number of processes initialized after boot, number of packages installed, free memory after boot, VM disk size, root partition disk size, used size on t

@Jelle-S
Jelle-S / install_ha_vb.sh
Last active May 12, 2024 18:40
Install Home Assistant on VirtualBox
# Installs Home Assistant on VirtualBox following https://www.home-assistant.io/installation/linux
# Install VirtualBox
sudo apt-get -y install virtualbox
# Create a new VM
VBoxManage createvm --name homeassistant --register
# Select OS type "Other Linux (64-bit)"
VBoxManage modifyvm homeassistant --ostype Linux_64
# Set RAM to 6GB (modify to your needs, TODO: make this an option, default value 2GB), video memory to 16MB (TODO: make this an option, default value 16MB)
VBoxManage modifyvm homeassistant --memory 6144 --vram 16
# 2 vCPUs (TODO: make this an option, default value 2)
@jboner
jboner / latency.txt
Last active May 12, 2024 18:40
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@Nicholas-Swift
Nicholas-Swift / astar.py
Last active May 12, 2024 18:34
A* pathfinding algorithm. Please see comments below for a fork of this gist that includes bug fixes!
class Node():
"""A node class for A* Pathfinding"""
def __init__(self, parent=None, position=None):
self.parent = parent
self.position = position
self.g = 0
self.h = 0
@RobertKrajewski
RobertKrajewski / mattermost-dl.py
Last active May 12, 2024 18:33
This script allows to export the content (text+files) of an interactively selected Mattermost channel (public, private, group, direct message) to files. Tested on Mattermost 5.27 using Python 3.7
import os
import sqlite3
from datetime import datetime, date
from typing import Tuple, Dict, List
import getpass
from mattermostdriver import Driver
import pathlib
import json
@mdasifmunshe
mdasifmunshe / Install Tailwind CSS with Vite and Yarn
Created February 25, 2023 15:20
Setting up Tailwind CSS in a Vite project with Yarn.
/* Terminal */
yarn create vite my-project
cd my-project
yarn add -D tailwindcss postcss autoprefixer
yarn tailwindcss init -p
/* tailwind.config.cjs */
/** @type {import('tailwindcss').Config} */
module.exports = {
@veuncent
veuncent / aws_glacier_delete_vault.md
Last active May 12, 2024 18:26
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME