Skip to content

Instantly share code, notes, and snippets.

@rugameuser
rugameuser / multiple-git-hooks.sh
Created January 10, 2024 06:35 — forked from mjackson/multiple-git-hooks.sh
Run multiple scripts for the same git hook
#!/bin/sh
# This script should be saved in a git repo as a hook file, e.g. .git/hooks/pre-receive.
# It looks for scripts in the .git/hooks/pre-receive.d directory and executes them in order,
# passing along stdin. If any script exits with a non-zero status, this script exits.
script_dir=$(dirname $0)
hook_name=$(basename $0)
hook_dir="$script_dir/$hook_name.d"
@rugameuser
rugameuser / cdrom-emulation.patch
Created January 9, 2024 21:12 — forked from saidsay-so/cdrom-emulation.patch
A recent patch to add CD-ROM emulation to your Android kernel (3.18+).
From 45b0c1da3ed92b232b35cc2922e696a5d0fc5c16 Mon Sep 17 00:00:00 2001
From: MusiKid
Date: Sat, 23 Sep 2017 19:46:02 +0200
Subject: [PATCH] Add CD-ROM emulation support.
# This is a recent patch to add CD-ROM emulation to your kernel
---
drivers/usb/gadget/function/f_mass_storage.c | 25 +++++++++++++++++++++++++
drivers/usb/gadget/function/storage_common.c | 4 ++--
# This xorg configuration file will start a dummy X11 server.
# move it to /etc/X11/xorg.conf
# don't forget apt install xserver-xorg-video-dummy;
# based on https://xpra.org/Xdummy.html
Section "ServerFlags"
Option "DontVTSwitch" "true"
Option "AllowMouseOpenFail" "true"
Option "PciForceNone" "true"
Option "AutoEnableDevices" "false"
@rugameuser
rugameuser / KMS_office.cmd
Created May 26, 2022 10:02 — forked from Zibri/KMS_office.cmd
KMS server Windows
@echo off
title Microsoft Office 2019 versions are supported!&cls&echo
============================================================================&echo
#Project: Activating Microsoft software products for FREE without software&echo
============================================================================&echo.&echo
#Supported products:&echo - Microsoft Office Standard 2019&echo - Microsoft Office Professional Plus 2019&echo.&echo.&(if exist
"%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist
"%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b
..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b
..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo
@rugameuser
rugameuser / ax201-hostapd.conf
Created May 22, 2022 21:19 — forked from iffa/ax201-hostapd.conf
hostapd config for Intel WiFi6 AX201 (5Ghz)
# Config for Intel WiFi6 AX201
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=1
ssid=AwesomeWifi
@rugameuser
rugameuser / decrypt.java
Created August 16, 2021 14:48 — forked from mar-v-in/decrypt.java
droidguasso.enc decrypter (including key material)
// Compile: javac decrypt.java
// Usage: java decrypt path-to/assets/droidguard/droidguasso.enc droidguasso.jar
import java.io.InputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.security.spec.AlgorithmParameterSpec;
import java.security.Key;
import javax.crypto.spec.IvParameterSpec;
@rugameuser
rugameuser / gist:a19eecaab2bd67300eb7698e905e32f0
Created April 25, 2021 07:39 — forked from pwlin/gist:8a0d01e6428b7a96e2eb
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case
Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement
Please fork, tweet about, etc.
----
Creating Shazam in Java
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
@rugameuser
rugameuser / mt7612
Created October 23, 2020 14:55 — forked from jeremyb31/mt7612
sudo apt install git build-essential
git clone https://github.com/ulli-kroll/mt7612u.git
cd mt7612u
make
sudo make installfw
sudo cp mt7612u.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/
sudo depmod -a
@rugameuser
rugameuser / ABOUT.md
Created July 7, 2020 08:31 — forked from laobubu/ABOUT.md
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913