Skip to content

Instantly share code, notes, and snippets.

# add a new client mode wifi interface
Edit `/etc/config/wireless` adding a section like this:
```
config wifi-iface
option device 'radio0'
option ifname 'cli0'
option network 'cwan'
#!/bin/bash
# This script is for setting TrackPoint sensitivity/speed/acceleration
# on a ThinkPad X220 to something reasonable since neither maxing out
# the UI mouse sensitivity nor maxing out /sys/devices options
# were getting the sensitivity high enough on their own.
SYSFS_PATH="/sys/devices/platform/i8042/serio1"
echo 0 > ${SYSFS_PATH}/inertia
@Juul
Juul / simple_gateway.md
Last active December 3, 2018 22:50
Turn your computer into a gateway that shares internet from the wifi to ethernet
# Edit /etc/NetworkManager/NetworkManager.conf adding the following
# to make network manager stop managing your ethernet interface
[keyfile]
unmanaged-devices=mac:3c:90:01:39:b2:62; 
# Use the MAC address from your ethernet card
# You can get the MAC address with the command: 
ip link show dev eth0
# (assuming your ethernet device is called eth0)
@Juul
Juul / ssh_dropbear_key_copy.sh
Created June 29, 2018 08:01
Copy your ssh public key to authorized keys for root on a system running dropbear (e.g. OpenWRT)
#!/bin/bash
if [ "$#" -ne "1" ]; then
echo "" > /dev/stderr
echo "Error: Invalid number of arguments" > /dev/stderr
echo "" > /dev/stderr
echo "Usage: $0 ip_or_hostname" > /dev/stderr
echo "" > /dev/stderr
exit 1
fi
@Juul
Juul / lte_mbim_from_scratch.md
Last active January 6, 2025 18:05
How to use 4G LTE modems like the MC7455 on both Debian/Ubuntu and OpenWRT using MBIM

The purpose of this document is to get you familiar with the concepts and command line tools involved with connecting to the internet using modern 4G LTE modems on both Debian/Ubuntu and OpenWRT.

This writeup is based on my experiences with the Sierra Wireless AirPrime MC7455 modem and a Calyx (Sprint) SIM card, but it should apply to most modern 4G LTE modems.

High level overview

These are the steps required:

  • Physically connect antennas
@Juul
Juul / cheap_1080p_hdmi_capture.md
Last active June 28, 2024 05:20
How to get a $33 HDMI capture and H264 encoder

This is a guide for how to get a $33 HDMI capture device and H264 encoder that can do 1080p 30 fps or 720p 60 fps. It will only output a H264 encoded stream and is not able to capture the raw HDMI data.

This is just a quick guide based on all the hard work and info from danman's blog post.

Buying

Go to ebay, aliexpress or similar and find a LKV373A sender. It is sold as a device for extending HDMI over ethernet cable. You only need to buy the sender, not the pair of sender and receiver. The sender is actually an HDMI capture and encoder device. It should cost ~$33 shipped. One of the commenters mentioned that you need v3 hardware and that this won't work with v4 hardware so beware!

Updating the firmware

@Juul
Juul / amazon_fire_2015_7_inc_lineageos_install.md
Last active February 22, 2025 23:09
How to install install LineageOS on a 2015 7" Amazon Fire tablet

This is a guide for getting LineageOS (an older and unofficial version) onto an Amazon Fire 2015 7" tablet (also known as the 5th generation 7" Amazon Fire or under the internal codename "ford").

NOTE: This guide was originally written before someone figured out how to unlock the bootloader. There is now a newer method. Here it is very briefly. The old guide can be found below.

Unlocked bootloader method

First unlock the bootloader using this guide.

Once you're booted into TWRP download the latest LineageOS 14 release for your device here.

@Juul
Juul / star_trek_tng_a_final_unity_guide.md
Last active December 25, 2021 16:13
How to get _Star Trek TNG: A final unity_ working on a GNU/Linux system

This is guide for how to get the game Star Trek TNG: A final unity working on a GNU/Linux system.

First download the game from myabandonware.com.

Unzip the file:

unzip Star-Trek-The-Next-Generation---A-Final-Unity_DOS_EN_ISO-Version.zip
@Juul
Juul / gcc_cross_switch_version.sh
Last active May 16, 2019 01:15
Switch currently used gcc cross-compiler versions
#!/bin/bash
# This script changes the `arm-linux-gnueabihf-*` (or specified prefix)
# symlinks in /usr/bin to point to the specified version
# e.g. running with "7" as the argument will create the symlink
# /usr/bin/arm-linux-gnueabihf-gcc -> /usr/bin/arm-linux-gnueabihf-gcc-7
# and so on for all the normal cross-compiler commands
CMDS=( "gcc" "gcc-ar" "gcc-nm" "gcc-ranlib" "cpp" "gcov" "gcov-dump" "gcov-tool" )
BINPATH=/usr/bin
@Juul
Juul / mount_dd_Image.sh
Created May 18, 2019 05:49
Mount all partitions from a full drive image
#!/bin/bash
# Mount all partitions from a full drive image
# in subdirs inside the specified dir
set -e
if [ ! "$#" -eq "2" ]; then
echo "Usage: $(basename $0) <image.dd> <mount_dir>" >&2
exit 1