Skip to content

Instantly share code, notes, and snippets.

@token0
token0 / !RebootToOs.md
Created November 29, 2023 19:06 — forked from Darkhogg/!RebootToOs.md
"Reboot to {OS}" scripts for rEFInd Next Boot selection

Reboot to {OS}

This a collection of notes and files used in my quest to create "Reboot to Windows" and "Reboot to Linux" scripts (and desktop shortcuts) for Linux and Windows respectively that automatically reboot my system and instruct rEFInd to auto-select the appropriate OS entry.

General Information

The key for achieving this is to modify the EFI Variable PreviousBoot with GUID 36d08fa7-cf0b-42f5-8f14-68df73ed3740, which rEFInd uses to store the last entry selected in the menu and, if using the + default entry, will be used to select the default OS. By doing this, we trick rEFInd into booting the OS we choose without having to be physically there to press the keyboard.

@token0
token0 / gist:f4dcf155c4d53baa78621931992c3be1
Created August 20, 2022 22:36 — forked from DD3Boh/gist:6c51fd3c5f91b1042e956771483714de
How to merge a newer CAF tag in an android kernel
First go here:
https://wiki.codeaurora.org/xwiki/bin/QAEP/release
This site gives information about all msm soc release details with tag + android version
Search your msm here.. Check the latest one and look for correct android version and mark that tag.
Now open one of the following links (dependent on your linux kernel version)
@token0
token0 / userChrome.css
Last active April 10, 2022 01:13 — forked from BrianGilbert/userChrome.css
Firefox userChrome to autohide Sideberry panel and hide titlebar tabs, and autohide Page Actions.
/*@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");*/
/* ^ disabled namespace, so fullscreen state can be processed */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* This style will hide the tab bar. For MacOS Big Sur
*
@token0
token0 / urandom-perf.md
Last active February 15, 2022 17:34
/dev/urandom performance

Simple benchmark of default entropy source performance on various CPUs

Reading 1000 MiB from entropy pool


Xiaomi MI-R3G @ Padavan (Linux 3.4.113):

system type             : MediaTek MT7621 SoC
cpu model               : MIPS 1004Kc V2.15
@token0
token0 / vmware-patch.sh
Created January 16, 2022 18:13
patch vmware to work on modern linux distro
#!/bin/bash
VMWARE_VERSION=`vmware-installer -l |grep workstat|awk '{print $2}' |awk 'BEGIN {FS="."}{print "workstation-"$1"."$2"."$3}'`
echo $VMWARE_VERSION
TMP_FOLDER=/tmp/patch-vmware
rm -fdr $TMP_FOLDER
mkdir -p $TMP_FOLDER
mkdir -p /etc/init.d
cd $TMP_FOLDER
git clone https://github.com/mkubecek/vmware-host-modules.git
@token0
token0 / gist:6213433ab85524a71a688c7d4c490477
Created April 17, 2021 22:04 — forked from jberkel/gist:1087757
HOWTO: compile mkbootimg/mkbootfs
get Android source code: http://source.android.com/source/downloading.html
$ cd /path/to/android-src
$ cd system/core/libmincrypt/
$ gcc -c *.c -I../include
$ ar rcs libmincrypt.a *.o
$ cd ../mkbootimg
$ gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a
$ cd ../cpio
$ gcc mkbootfs.c -o mkbootfs -I../include
@token0
token0 / TrueColour.md
Created March 21, 2021 23:49 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)