Skip to content

Instantly share code, notes, and snippets.

View mrcodetastic's full-sized avatar

mrcodetastic

View GitHub Profile
@mrcodetastic
mrcodetastic / CAP3702I.md
Last active December 3, 2025 16:47
Converting an eBay Cisco AIR-CAP3702I-E-K9 to a standalone WiFi Access Point for Home Use

Background

Cisco AIR-CAP3702I-E-K9 Wireless Access points, are (as of 2025) about 10 years old and largely redundant in the face of WiFi's evolution over the past decade. However, they still are useful for most Home/Home Office use cases as the 5Ghz througput is up to 1300mbps, and unless you have gigabit internet, then one of these could be a cheap way to extend your WiFi.

They can be purchased for about $10 off eBay (as of 2025) these days, and are cheaper than spending money on a new Wireless AP, when you probably don't need most of the requirements.

image

Converting an eBay Cisco AIR-CAP3702I-E-K9 to an Autonomous/Standalone AP

The Cisco AIR-CAP3702I-E-K9's sold on eBay will be most likely old infrastructure from an Office, and as such, will be running the wrong firmware for home use. They'll be running 'lightweight' firmware which means they AP's themselves are 'dumb

# Dummy display configuration for Xorg to enable a headless Linux server accessable using VNC.
# Save as: /etc/X11/xorg.conf.d/20-dummy.conf
Section "Device"
Identifier "DummyDevice"
Driver "dummy"
VideoRam 256000
EndSection
Section "Monitor"
@mrcodetastic
mrcodetastic / LlamaThink-8b-Instruct Finetuning Process.md
Last active February 15, 2025 14:32
LlamaThink-8b-Instruct Finetuning Process
@mrcodetastic
mrcodetastic / vnc_connect.sh
Created November 20, 2024 22:28
VNC to a host behind NAT using a VPS and SSH
#!/bin/bash
# Run this script on a client computer that needs to connect to a VPS (using a ssh key), and uses a forwarded SSH port
# that exists on that VPS (from the client that is behind NAT) to connect to the SSH server on the final client,
# and uses that connection to forward local ports via the overall-SSH connection that is passing via the VPS.
#
# Client (forwards port 2201 on the VPS at 2202 locally) -> NAT -> VPS <- NAT <- Host (forwards port 22 as Port 2201 on the VPS)
# Connecting to 'localhost' on port '2202' on the client, is the same as connecting to port 22 on the Host.
#
# Requirements
# SSH key setup on both VPS and Ultimate Host to avoid interactive login steps.
@mrcodetastic
mrcodetastic / boot_linux_from_sdcard_thinkpad.txt
Last active November 20, 2024 21:10
How to install and dual boot Linux from a SDCard on a Thinkpad x280
https://www.reddit.com/r/linux4noobs/comments/faavoz/guide_how_to_install_linux_ubuntu_on_a_laptop_sd/
@mrcodetastic
mrcodetastic / cie1931.cpp
Last active March 16, 2025 00:45 — forked from mathiasvr/cie1931.py
Convert LED brightness to PWM value based on CIE 1931 curve.
// Generate lookup table for converting between perceived LED brightness and PWM
// Adapted from: https://jared.geek.nz/2013/feb/linear-led-pwm
// See also: https://ledshield.wordpress.com/2012/11/13/led-brightness-to-your-eye-gamma-correction-no/
#include <iostream>
#include <cmath>
#include <iomanip>
constexpr int TABLE_SIZE = 256; // Number of steps (brightness)
/*
RadioLib SX127x Ping-Pong Example
For default module settings, see the wiki page
https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx127xrfm9x---lora-modem
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
Customised for a ESP32 S3 'hat' that uses the following PIN mappings:
Cool apps:
Universal Radio Hacker: https://github.com/jopohl/urh
SDR Sharp
-> Use 'Zadiag' on Windows to attach a WinUSB to the 'Bulk In Interface 0' for the RTL2832 device.
RTL-SDR read of 433Mhz relay switch like:
'kebidu 1Pc RF Transmitter 433 Mhz Remote Controls with Wireless Remote Control Switch DC 12V 1CH relay Receiver Module'
https://www.aliexpress.com/item/32956103016.html?spm=a2g0o.order_list.0.0.21ef1802ISdJsi
@mrcodetastic
mrcodetastic / WFH_Emulator.ino
Last active August 3, 2024 21:52
USB Mouse Jiggler (Work From Home (WFH) emulator)
/*
* Compile and flash this firmware onto a ESP32-S2 and then use a seperate micro USB connector
* to connect the S2's Pin 19 to USB D- and Pin 20 to USB D+ (and of course +5V to +5V and GND to GND)
*
* IMPORTANT: On an ESP32-S2 Mini using Arduino IDE, make sure you have 'USB CDC On Boot' set to 'False'
* otherwise the 'USB Device Name' that shows up on Windows will not be correct as per the code below.
*
* It will appear as a 'USB Mouse' in Windows/Linux/Mac, and move the mouse every 30 seconds or so
* that you are always online/green. The ESP's LED will flash briefly when this occurs.
*
@mrcodetastic
mrcodetastic / WindowsAuthApacheHTTPConnect.java
Created July 6, 2021 17:29
Connect to a website using Apache HTTPClient5 using Windows Authentication
class Session {
/*
* Use Apache HTTPClient5 WinClient extensions to automatically gain SSO login via. domain credentials of
* currently logged in user.
*/
// Store SSO cookie's between httpclient and server to maintain session
private CookieStore cookieStore = new BasicCookieStore();
// Base http configuration used for all http requests
private RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(300, TimeUnit.SECONDS)