Skip to content

Instantly share code, notes, and snippets.

View hazmei's full-sized avatar

Hazmei Abdul Rahman hazmei

View GitHub Profile
@butageek
butageek / windows_activation.md
Last active May 2, 2024 12:01
Activate Windows for free

For Windows 10

Step 1 - Open PowerShell or Command Prompt as administrator

Step 2 - Install KMS client key

slmgr /ipk your_license_key

Replace your_license_key with following volumn license keys according to Windows Edition:

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active May 2, 2024 02:07
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@gordonbondon
gordonbondon / apply.sh
Created January 5, 2020 15:26
Bash scripts for atlantis custom steps
#!/usr/bin/env bash
set -e
# dont add pipefail because we need to catch exit code inside pipe
MISSING_VAR_MESSAGE='must be running inside atlantis'
: "${ATLANTIS_TERRAFORM_VERSION:?$MISSING_VAR_MESSAGE}"
: "${DIR:?$MISSING_VAR_MESSAGE}"
@noahbliss
noahbliss / proxprep.sh
Last active September 15, 2023 01:31
Proxmox Setup for General Dev Use
# Swap to free repo
wget -qO- https://gitlab.com/shebang/bashengine/raw/master/root/proxmox/aptfix | bash
apt update
apt upgrade -y
apt dist-upgrade -y
# Remove Nag. (Needs to be done after most upgrades that impact pve-manager)
cat <<EOF > /etc/apt/apt.conf.d/80pvenagfix
@mayneyao
mayneyao / notion2blog.js
Last active February 29, 2024 18:01
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",

Trying to deploy WPA3 on my home network

Introduction

Recently, news broke about a new possible offline attack on WPA2 using PMKID. To summarize the attack, WPA2 protected APs can end up broadcasting PMKID values which can then be used to offline-brute-force the password.

These PMKID values are computed this way:

PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
# src: http://jonathannicol.com/blog/2013/11/19/automated-git-deployments-from-bitbucket/
#~/.ssh/config
Host bitbucket.org
IdentityFile ~/.ssh/bitbucket_rsa
# clone project
git clone --mirror git@bitbucket.org:<username>/<repo-name>.git
@subfuzion
subfuzion / curl.md
Last active May 3, 2024 09:26
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@iarrup
iarrup / ConfigureSplunkForwarder.sh
Created February 23, 2016 18:55
Configure Splunk Universal Forwarder on Ubuntu
## Download the splunk universal forwarder
# Would probably need to login to splunk first.
wget -O splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=6.3.3&product=universalforwarder&filename=splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb&wget=true'
## install
# It gets installed in /opt/splunkforwarder
sudo dpkg -i splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb
## add the entry to init.d