Skip to content

Instantly share code, notes, and snippets.

View alecdwm's full-sized avatar

Alec WM alecdwm

View GitHub Profile
@Minionguyjpro
Minionguyjpro / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Last active April 29, 2024 14:50
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

@bitcoinwarrior1
bitcoinwarrior1 / substrate_get_balances_low_level.js
Last active August 18, 2021 04:16
Getting balances from a substrate node using RPC
// UPDATED THANK YOU @al3mart
util_crypto.xxhashAsHex("System", 128)
> "0x26aa394eea5630e07c48ae0c9558cef7"
util_crypto.xxhashAsHex("Account", 128)
> "0xb99d880ec681799c0cf30e8886371da9"
// https://westend.subscan.io/account/5ENpP27BrVdJTdUfY6djmcw3d3xEJ6NzSUU52CCPmGpMrdEY
util_crypto.blake2AsHex(keyring.decodeAddress("5ENpP27BrVdJTdUfY6djmcw3d3xEJ6NzSUU52CCPmGpMrdEY"), 128)
> "0xbb08f275d00049b315666c2c44130a10"
@bumi
bumi / yjs-pg-server.js
Created March 20, 2020 10:04
implementation of a websocket server storing yjs documents in a postgresql database
const WebSocket = require('ws');
const http = require('http');
const Y = require('yjs');
const wsUtils = require('./utils');
const cookie = require('cookie');
const QuillDelta = require('quill-delta');
//const QuillConverter = require('node-quill-converter');
//const MdastFromQuillDelta = require('mdast-util-from-quill-delta');
@rust-play
rust-play / playground.rs
Created December 7, 2018 22:55
Code shared from the Rust Playground
type BarberId= usize;
type ShopId = usize;
struct Shop {
barber: Option<BarberId>,
}
struct Barber {
shop: Option<ShopId>,
}
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 30, 2024 12:25
set -e, -u, -o, -x pipefail explanation
@sebastiencs
sebastiencs / volume.sh
Last active February 13, 2024 11:19
Script to get volume notification with dunst http://imgur.com/a/qWgAw
#!/bin/bash
# You can call this script like this:
# $./volume.sh up
# $./volume.sh down
# $./volume.sh mute
function get_volume {
amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1
}
@csswizardry
csswizardry / README.md
Last active April 2, 2024 20:17
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@jessfraz
jessfraz / j3ss.co.conf
Created October 1, 2016 21:37
nginx go-get vanity urls
server {
....
location ~ ^/x/(.*) {
if ($args = "go-get=1") {
add_header Content-Type text/html;
return 200 '<meta name="go-import" content="$host/x/$1 git https://github.com/jessfraz/$1.git">';
}
return 302 https://github.com/jessfraz/$1;
}
@jkullick
jkullick / headless-luks-encrypted-ubuntu-server.md
Last active March 15, 2024 21:08
Headless LUKS encrypted Ubuntu Server on Hetzner
# stop active raid
mdadm --stop /dev/md[01]

# destroy partition table on hdds
dd if=/dev/zero of=/dev/sda bs=1M count=512
dd if=/dev/zero of=/dev/sdb bs=1M count=512

# create new partition table
sgdisk -og /dev/sda
@polonskiy
polonskiy / 10-custom.conf
Last active June 4, 2021 22:36
sysctl tuning for docker & serf
# values from https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Welcome%20to%20High%20Performance%20Computing%20%28HPC%29%20Central/page/Linux%20System%20Tuning%20Recommendations
# install (root): curl -s https://gist.githubusercontent.com/polonskiy/00a71bab32360ffcb79f/raw/10-custom.conf > /etc/sysctl.d/10-custom.conf
# apply (root): sysctl -p /etc/sysctl.d/10-custom.conf
net.ipv4.neigh.default.gc_thresh1 = 30000
net.ipv4.neigh.default.gc_thresh2 = 32000
net.ipv4.neigh.default.gc_thresh3 = 32768
net.ipv6.neigh.default.gc_thresh1 = 30000
net.ipv6.neigh.default.gc_thresh2 = 32000