Skip to content

Instantly share code, notes, and snippets.

View elzii's full-sized avatar

Alexander Zizzo elzii

View GitHub Profile
@joseluisq
joseluisq / resize_disk_image.md
Last active May 15, 2025 17:03
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@niw
niw / README.en.md
Last active March 30, 2025 06:00
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
@windyinsc
windyinsc / enable-touch-id-for-sudo.md
Created November 19, 2020 20:16
macOS - Enable Touch ID for sudo

Enable Touch ID for sudo

Thanks to this awesome Six Colors post: Quick Tip: Enable Touch ID for sudo

The short of it:

  1. In your terminal go to cd /etc/pam.d/.
  2. Now open the sudo file with your favorite command-line/GUI text editor.
    • Note that if you open it via the command-line, you’ll need to use sudo itself to do so, since the file is (understandably) protected.
  3. With the sudo file open, add the following command below below the first line. auth sufficient pam_tid.so
@jwasden
jwasden / pihole-steps.md
Last active October 25, 2021 01:35
Up and running with pi hole.

Steps to set up a pi hole on a rpi zero w

  1. Get a raspberry pi zero w (not required, as you can run the software elsewhere, but c'mon, you want to get a r-pi anyway.)
  2. Flash an OS to the pi
  3. Set up auto install on first boot
  4. Boot it up
  5. Set up the pihole as your DNS

1. Get a pi

// ==UserScript==
// @name Ebay Motherufcker
// @namespace https://gist.github.com/Eibwen/
// @version 0.5
// @description Bid at the last moment
// @updateURL https://gist.github.com/Eibwen/08fab2f3fe2f10ca25ae96433c7ecc9b/raw/ebay-bid-sniper.user.js
// @author Greg Walker
// @match https://www.ebay.com/itm/*
// @grant none
// ==/UserScript==
@cgsdev0
cgsdev0 / zsh_web_server.md
Last active January 22, 2025 03:18
ZSH Web Server

ZSH Web Server

Have you ever used the command python -m http.server and thought hmm... I really wish this didn't require such a heavy depedency like Python?

Well, now you can accomplish the same goal from the comfort of ZSH! Simply add this line to your zsrhc, then type serve in the folder you'd like to start a HTTP server for.

serve () { rm /tmp/tunnel; mkfifo /tmp/tunnel; echo "Serving $(pwd) on 127.0.0.1:8000..."; while true; do (printf "HTTP/1.0 200 OK\n"; (reqreader() { while IFS= read line;  do [[ $line = $'\r' ]] && break; echo "$line"; done; exit 0; }; var=$(</tmp/tunnel | reqreader); var=$(echo "$var" | grep ^GET | sed 's/GET \(.*\) HTTP\/1\.1.*/\1/'); var=$(echo "$var" | sed 's/^\(.*\)@$/\1/' | sed 's/^\(.*\)\*/\1/'); var=$(echo "<!doctype html><html><head><title>$(pwd)</title></head><body>"; (cat "./$var" 2> /dev/null || (ls -F "./$var" 2> /dev/null | sed 's/\(.*\)/<a href="\1">\1<\/a><br \/>/')); echo "</body></html>"); printf "Content-Length: "; echo "$var" | wc -c; printf "\r\n
@MateuszKubuszok
MateuszKubuszok / .tmux.conf
Created January 4, 2020 14:09
Sane Tmux config which can be used with mouse and have nice copy/tiling/searching things turned on and added to right mouse button menu
# Open window/pane in the same PATH
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Reload config
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
# Window tab menu
bind-key -T root MouseDown3Status display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y S \
"Swap Left" l "swap-window -t:-1" \

PlatformIO with Vim (neomake, clang, coc-vim, ale)

Requirements

PlatformIO

clangd

@denizssch
denizssch / XpSerials.txt
Created July 21, 2019 00:13
Windows XP ALL Serial Keys :) (For testing purpose [Ex: VM or PenTest])
FCKGW-RHQQ2-YXRKT-8TG6W-2B7Q8
Windows XP PRO Corporate serial number S/N: Key: MQPWW-PGVKX-YPMKG-8DH3G-KC8PW
windows xp home edition serial number S/N: 034634-262024-171505-828316-729010-413531-800424-400442
Windows XP 64 serial number S/N: B2RBK-7KPT9-4JP6X-QQFWM-PJD6G
Windows XP serial number S/N: K6C2K-KY62K-DQR84-RD4QV-QB74Q
Windows XP Professional 64-bit Corporate Edition 5.2.3790.1830 serial number S/N: VCFQD-V9FX9-46WVH-K3CD4-4J3JM
Microsoft Windows XP Professional SP2 serial number S/N: YY8F2-3CKVQ-RKTRG-6JMDR-9DTG6
Windows XP Professional Service Pack 1 sp1 serial number S/N: F46YY - 2R8VQ - R8GMY - 926VK - 6BQ73
Windows XP Pro serial number S/N: KBWR7-76BD8-J7MDQ-KKG&C-V9Q2J