Skip to content

Instantly share code, notes, and snippets.

View abbaty48's full-sized avatar
🏠
Working from home

Abbatyya abbaty48

🏠
Working from home
View GitHub Profile
@klingtnet
klingtnet / enable-hibernate-arch-linux.md
Created November 22, 2016 17:23
Enable hiberate in Arch Linux usind kernel 4+, grub2 and a swapfile

This guide is based on the hibernate article from the Arch wiki.

  • edit /etc/default/grub and add resume as well as resume_offset kernel parameters
    • resume=UUID=abcd-efgh contains the UUID of the partition on which the swapfile resides. In most cases the swapfile resides in root, to identify the root parition's UUID run blkid or lsblk -O.
    • resume_offset=1234 is the offset of the swapfile from the partition start. The offset is the first entry in the physical_offset column of the output of filefrag -v /swapfile.
    • update grub: grub-mkconfig -o /boot/grub/grub.cfg
    • example: GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=75972c96-f909-4419-aba4-80c1b74bd605 resume_offset=1492992"
  • add the resume module hook to /etc/mkinitcpio.conf:
    • HOOKS="base udev resume autodetect ...
  • rebuild the initramfs mkinitcpio -p linux
#!/bin/bash
#
# Script to flash custom firmware to Intel chipset based Chromebooks
#
readonly URL_PREFIX=https://www.johnlewis.ie/Chromebook-ROMs
readonly MAINTENANCE=no
declare FLASHROM_CMD MODEL AREA R_OR_W
readonly OPTION_1="
1. Modify my Chromebook's RW_LEGACY slot.
@jonaaix
jonaaix / AesUtil.ts
Last active February 22, 2025 02:18 — forked from AndiDittrich/AesUtil.js
Node.js - AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
/**
* Cryptography Functions
*
* Forked from AndiDittrich/AesUtil.js
* https://gist.github.com/AndiDittrich/4629e7db04819244e843
*/
import crypto, { CipherGCM, CipherGCMTypes, DecipherGCM } from 'crypto';
import { Password } from './types';
@joshtynjala
joshtynjala / profiles.json
Created August 8, 2019 15:46
Ayu color schemes for Windows Terminal
{
"schemes" :
[
{
"background" : "#fafafa",
"black" : "#000000",
"blue" : "#3199e1",
"brightBlack" : "#686868",
"brightBlue" : "#399ee6",
"brightCyan" : "#4cbf99",
@larrybahr
larrybahr / Upgrade Windows 10 Home to Windows 10 Pro.md
Last active November 25, 2025 06:31
Upgrade Windows 10 Home to Windows 10 Pro.

I got a Windows 10 key and tried to do the normal upgrade, but got a "0xc004f050" error. I then tried to fix it by useing the generic pro key but then got a "0x803fa067" error. These are the steps the finally got everything working. I did the this on 2 PC so I think it is solid.

  1. buy a valid Windows 10 Pro key (any key will work)
    1. I got mine on Ebay for $4. It said 1 minute delivery, but it took about 1 hour to get it.
  2. Make sure Windows is up to date.
  3. Change product keys (remember these steps you will use them a lot)
    1. Select the Start button
    2. Then select Settings > Update & Security
  4. Then select Activation
@shanselman
shanselman / ohmyposhv3-v2.json
Last active November 24, 2025 22:58
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,