Skip to content

Instantly share code, notes, and snippets.

View shantur's full-sized avatar

Shantur Rathore shantur

  • London
View GitHub Profile
@shantur
shantur / Three-4GPlus-Hub-Hack-CharlesRules.xml
Created May 3, 2023 06:26
Charles ReWrite rules for hacking and enabling admin mode on Three 4G+ Hub
<?xml version='1.0' encoding='UTF-8' ?>
<?charles serialisation-version='2.0' ?>
<rewriteSet-array>
<rewriteSet>
<active>true</active>
<name>Three 4G+ Hub - Admin Mode</name>
<hosts>
<locationPatterns>
<locationMatch>
<location>
@shantur
shantur / program-spi-nor-with-u-boot.md
Created January 3, 2023 21:25 — forked from hxmuller/program-spi-nor-with-u-boot.md
Program the SPI NOR flash on a Pinebook Pro using a micro SD card and u-boot

Program SPI NOR Flash on Pinebook Pro with u-boot on micro SD Card

TL;DR: This describes the process, hardware, and software used to perform in-circuit programming of the 128Mbit SPI NOR flash (flash) in the Pinebook Pro (PBP) using u-boot on a micro SD Card.

Warning

You, the user of this information bear ALL responsibility for ANY outcome of its use, whether negative or positive.

The flash (identified below) this document refers to is rated for a minimum 100000 program/erase cycles. Exercising it beyond that limit will likely require its replacement which is non-trivial.

@shantur
shantur / pikvm-install.sh
Last active December 20, 2023 04:04
PiKVM on RockPro installation
# For installing PiKVM on RockPro64 with HDMI-USB Capture device.
# Install Manjaro linux
# Run this script as sudo pikvm-install.sh
# Enable Otg on USB-C Port
pacman -Syu --noconfirm dtc
fdtput -t s /boot/dtbs/rockchip/rk3399-rockpro64.dtb /usb@fe800000/usb@fe800000 dr_mode peripheral
@shantur
shantur / MacPro-2013-GPU-Passthrough.txt
Last active March 31, 2024 06:49
MacPro 6,1 Late 2013 ESXi Ubuntu FirePro D700 / D500 passthough settings
ESXi Setup
1. Add to /etc/vmware/passthru.map
1002 6798 d3d0 default
1002 aaa0 d3d0 default
2. Run these commands
esxcli system settings kernel set -s vga -v FALSE
esxcli system settings kernel set -s iovDisableIR -v TRUE
@shantur
shantur / amdgpu_bios.patch
Created November 2, 2020 23:12
ESXi Linux VM Amdgpu bios not found hack
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
index 50dff69a0f6e..76b66284f631 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
@@ -29,6 +29,7 @@
#include "amdgpu.h"
#include "atom.h"
+#include <linux/firmware.h>
#include <linux/pci.h>
@shantur
shantur / convertall.sh
Created September 2, 2016 09:19
Converts all mp4 files in a folder tree to another folder tree
#!/bin/bash
# loop & print a folder recusively,
recurse() {
echo $1 $2 $3
for i in "$1"/*;do
if [ -d "$i" ];then
outputdir=`echo $i | sed "s/$2/$3/g"`
echo "outputdir: $outputdir"
mkdir -p "$outputdir"