Skip to content

Instantly share code, notes, and snippets.

View raspiduino's full-sized avatar

gvl610 raspiduino

View GitHub Profile
@raspiduino
raspiduino / sudocmd.md
Last active September 21, 2024 03:57
Sudo command for cmd

Sudo command for cmd

What is this?

In Linux, we can use sudo to run command as root. In Windows, we can use runas command to do that, but it doesn't support for empty password file! So we make this small macro for you to do the same thing as sudo for Windows.

How to use this?

Install this macro:

doskey sudo=start /min powershell -Command "Start-Process $* -Verb runAs"

Using this macro:

@raspiduino
raspiduino / windows7-for-2gb-disk.md
Last active December 24, 2020 04:09
Windows 7 version only 2GB disk space (installed)

Windows 7 version only 2GB disk space (installed)

There are many sites on the Internet show you how to make a lightweight Windows version, but none show you how to create a light Windows to fit your 2GB disk (usually USB). You often have to use the PE version, and it often comes with many tools that you don't need.
So I have made a light version of Windows 7 (installed on vmdk format) and you can do anything you want with it: copy to a USB, put it to a VM or even upload it to Google Cloud shell and run it remotely. Have fun! You can download it here.

@raspiduino
raspiduino / readme.md
Created April 4, 2021 16:20
Simple hack for AVR simulator IDE

Simple hack for AVR simulator IDE

Disclaimer: By using this script (Microsoft Windows registry .reg script), you agreed that you use it as your own risk. We provided it WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Intro

AVR simulator IDE is a wonderful AVR simulator program, but it has only 30 times x 60 minutes per time try. So I have done many things to increase the limit, then I finally did it and want to share it with you!

Code

Simply it's just a registry hack:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Data\Microsoft]
@raspiduino
raspiduino / hello.exe.c
Last active June 4, 2022 03:21
x64 exe -> LLVM IR -> x32 exe
//
// This file was generated by the Retargetable Decompiler
// Website: https://retdec.com
// Copyright (c) Retargetable Decompiler <[email protected]>
//
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@raspiduino
raspiduino / uninstall-cuda-on-mac.md
Created June 4, 2022 03:28 — forked from patharanordev/uninstall-cuda-on-mac.md
Uninstall CUDA.framework on macOS

Uninstall CUDA.framework on macOS

If you

  • got message like "CUDA.framework is malware, ... damage on your mac"
  • using OpenCL instead
  • using macOS 10.14+ (used Metal framework instead)

and try to remove it.

Delete the following folders/files:

@raspiduino
raspiduino / remove.py
Created August 12, 2022 03:24
Remove the first `+` character in a diff when you need to copy some large added code
f = open("in.c")
a = f.read().split("\n")
f.close()
b = []
for i in a:
b.append(a[1:])
f = open("out.c", "w")
@raspiduino
raspiduino / ldd1.txt
Last active February 23, 2023 18:35
Get `libvulkan.so` to load
root@localhost:~# ldd /system/lib64/libvulkan.so
linux-vdso.so.1 (0x00000077322f2000)
[email protected] => /system/lib64/[email protected] (0x000000773226c000)
android.hardware.configstore-utils.so => /system/lib64/android.hardware.configstore-utils.so (0x00000077322eb000)
libziparchive.so => /system/lib64/libziparchive.so (0x000000773225d000)
libhardware.so => /system/lib64/libhardware.so (0x00000077322e7000)
libsync.so => /system/lib64/libsync.so (0x0000007732258000)
libbase.so => /system/lib64/libbase.so (0x0000007732243000)
libdl_android.so => /system/lib64/libdl_android.so (0x0000007732240000)
libhidlbase.so => /system/lib64/libhidlbase.so (0x000000773219a000)
@raspiduino
raspiduino / loadmap.py
Created September 28, 2023 11:53
IDAPython script for loading Linux kernel's generated System.map
import idaapi
import idc
import idautils
# Function to open a file dialog and return the selected file path
def select_map_file():
map_file = idaapi.ask_file(0, "*.map", "Select System.map")
return map_file
# Function to parse the map file and create a dictionary of address-function name mappings
@raspiduino
raspiduino / readme.md
Last active December 24, 2023 16:38
Quick and dirty solution for the Segmentation fault problem of processing package libc-bin when using apt in Armbian

I recently have Armbian installed on my set-top box and its apt got crazy when I used it:

$ sudo apt install xfce4-terminal
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libvte-2.91-0 libvte-2.91-common
The following NEW packages will be installed:
@raspiduino
raspiduino / readme.md
Last active June 22, 2024 04:36
How to build QEMU ESP32 for Windows

How to build QEMU ESP32 for Windows

QEMU ESP32 is a fork of QEMU with Espressif patches for emulating ESP32 microcontroller series. Normally there is prebuilt files in Releases tab, but for some reasons if you want to (or have to) build yourself, then you can follow this guide.

I would recommend Windows environment with MSYS2 for building this. This guide aims at building for x64 architecture, but probably you can do the same for x86 by replacing x86_64 packages with x86 ones.

  • Step 1: Install MSYS2.
  • Step 2: Open MSYS2 MINGW64 prompts.
  • Step 3: Install required packages