Skip to content

Instantly share code, notes, and snippets.

View Tombar's full-sized avatar

Martin Loy Tombar

View GitHub Profile
@shehbajdhillon
shehbajdhillon / adb-tailscale-android-use.md
Last active February 6, 2026 19:06
Setup guide for letting AI agents (Claude Code, Cursor, etc.) control your Android remotely via ADB + Tailscale

ADB over Tailscale

Securely connect to Android over the internet using ADB + Tailscale.

You can also copy paste this gist into your agent of choice and have it explain you what to do.

This guide sets up remote ADB access so you can run android-use — an agent skill that lets AI interact with your Android device over ADB.


# Instructions for fresh install
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
@maxried
maxried / $README.md
Last active May 16, 2025 08:49
Automatically Sign Kernels After Installation

This script goes into /etc/kernel/postinst.d. You have to make it executable by root, e.g. chown root:root /etc/kernel/postinst.d/00-signing ; chmod u+rx /etc/kernel/postinst.d/00-signing. It assists you with automatically signing freshly installed kernel images using the machine owner key in a way similar to what dkms does. This is mainly useful if you want to use mainline kernels on Ubuntu on Secure Boot enabled systems. This needs shim-signed to be set up. If you have questions this one might help you: While I made this for Ubuntu 20.04, it should work on current Debian based distributions. YMMV.

@hardboiled
hardboiled / single-file-pr-example-using-github-api.md
Last active February 18, 2020 22:19
An example of how to use github's api to create a PR with a single file change.

How to make a single file PR using github API

(Note this is using github's v3 API. They have a new v4 version that uses graphql. Haven't tried that at the time of writing.)

Using github API is a bit weird at first, because uses the same lower-level git commands that are abstracted away to the normal user. However, this is actually a good thing to some degree, because it means you can do things like changing a single file without copying out an entire branch or repo to your disk.

I will be referencing git objects (blobs, trees, refs, etc.) in this short tutorial, but not covering them in gory detail. You can learn more about them here.

Step 1 Upload a Blob

@maxried
maxried / README.md
Created January 17, 2020 14:46
Wireguard in initrd

These scripts allow you to have a wireguard connection in your initrd. Make sure you have wireguard installed on your system and a busybox which supports ip, nslookup. If it does not work, change the copy_exec line for busybox in the hook and replace it with a better one. It reads /etc/wireguard/initramdisk.conf and expects at least one comment specifying all ip addresses like so: # Address = 1.2.3.4/12. Tested on Ubuntu 19.10.

@lizthegrey
lizthegrey / attributes.rb
Last active February 5, 2026 21:27
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@svet-b
svet-b / bigdashboard_output.pdf
Last active April 23, 2025 03:06
PDF export of Grafana dashboard using puppeteer
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexellis
alexellis / k8s-pi.md
Last active June 28, 2025 05:44
K8s on Raspbian