Skip to content

Instantly share code, notes, and snippets.

@supechicken
supechicken / root_mi_box_s_2nd_gen.md
Last active May 2, 2024 05:00
A tutorial for rooting Xiaomi TV Box S 2nd Gen (jaws) without UART/teardown

Rooting Xiaomi TV Box S 2nd Gen (jaws) without UART/teardown

Table of contents

  • Prerequisites
  • Step 1: Download the stock ROM for Xiaomi TV Box S 2nd Gen
  • Step 2: Extract boot image from the OTA archive
  • Step 3: Update the system with downloaded OTA archive
  • Step 4: Patch boot image with Magisk
  • Step 5: Unlock bootloader with fastboot
  • Step 6: Reboot to system and complete setup
@instance-id
instance-id / unitytool.ps1
Last active October 3, 2022 18:32
Launch unity project by name (automatically in correct editor version). Automatically fix Unity: "Failed to load layout window" issue. Create new project from CLI. Add packages / assets to project before launch
#!/usr/bin/env pwsh
<#
.NOTES
============================================================
Last Edit: 5/29/2021
Created by: instance.id (https://github.com/instance-id)
Platform: Windows/Linux
Filename: unitytool.ps1
PSVersion: Last tested with 7.2-preview5
@instance-id
instance-id / unityfixlayout.ps1
Last active November 23, 2020 03:11
Unity: "Failed to load layout window" fix. See new version : https://gist.github.com/instance-id/3161cc2b5343db5bc3cef494d83a7449
#--------------------------------------------------------------------------------------------------------------
# This has been updated and changed to include several new features. See the link below for updated version: --
# https://gist.github.com/instance-id/3161cc2b5343db5bc3cef494d83a7449 ----------------------------------------
#--------------------------------------------------------------------------------------------------------------
# Replace folder paths in $projectLocations array (line 20) with your actual Unity project folder path(s)
# Usage: .\unityfixlayout.ps1 -Project MyProjectName
Param (
[Parameter()]
@luisparravicini
luisparravicini / GizmosExtensions.cs
Created August 1, 2020 11:23
Method to draw an arc with Unity's Gizmos
using UnityEngine;
public class GizmosExtensions
{
private GizmosExtensions() { }
/// <summary>
/// Draws a wire arc.
/// </summary>
/// <param name="position"></param>
@thebeardphantom
thebeardphantom / EditorHelper.cs
Created July 29, 2019 03:13
Show confirmation dialog before actually quitting the Unity Editor.
using UnityEditor;
[InitializeOnLoad]
public static class EditorHelper
{
#region Constructors
static EditorHelper()
{
EditorApplication.wantsToQuit += OnEditorWantsToQuit;
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 26, 2024 17:20
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@Darkhogg
Darkhogg / !RebootToOs.md
Last active May 1, 2024 20:38
"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.

@cjddmut
cjddmut / EasingFunctions.cs
Last active May 2, 2024 12:04
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights