Skip to content

Instantly share code, notes, and snippets.

@kirelagin
kirelagin / quest.sh
Created December 29, 2021 20:13
Find available appointments at Quest Diagnostics labs
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2021 Kirill Elagin <https://kir.elagin.me/>
# SPDX-License-Identifier: CC0-1.0
###
#
# Find available appointments at Quest Diagnostics labs.
#
# This quick-and-dirty script queries their appointment scheduling API
@kirelagin
kirelagin / tmuxshow
Last active September 23, 2020 01:06
Mirror a tmux session in two terminals.
#!/bin/sh
# SPDX-FileCopyrightText: 2018 Kirill Elagin <https://kir.elagin.me/>
# SPDX-License-Identifier: MPL-2.0
###
#
# Mirror a tmux session in two terminals.
#
# This script is ideal for all kinds of demonstrations, lectures, talks, etc.
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 Kirill Elagin <https://kir.elagin.me/>
# SPDX-License-Identifier: MPL-2.0
###
#
# Convert a Noun Project icon to a PNG of the right size.
#
# This simple tool takes a free “basic” SVG icon from The Noun Project
@kirelagin
kirelagin / git-fixup
Last active April 20, 2020 19:30
Quickly edit a file that was changed in the last git commit
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2020 Kirill Elagin <https://kir.elagin.me/>
# SPDX-License-Identifier: MPL-2.0
###
#
# Quickly edit a file that was changed in the last git commit.
#
# Sometimes you want to make a quick amendment to what you did in your last
@kirelagin
kirelagin / rssi.sh
Last active August 17, 2019 22:43
Monitor signal strength (RSSI) of the active Wi-Fi network on macOS
#!/bin/bash
# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/>
# SPDX-License-Identifier: MPL-2.0
###
#
# Monitor signal strength (RSSI) of the active Wi-Fi network on macOS.
#
# Usage:
@kirelagin
kirelagin / rssi.sh
Last active May 20, 2023 12:42
Monitor signal strength (RSSI) of a Wi-Fi network on Linux
#!/bin/sh
# SPDX-FileCopyrightText: 2019 Kirill Elagin <https://kir.elagin.me/>
# SPDX-License-Identifier: MPL-2.0
###
#
# Monitor signal strength (RSSI) of a Wi-Fi network on Linux.
#
# Given an SSID, the script outputs the signal strength of the
@kirelagin
kirelagin / lineageos-shell.nix
Last active October 22, 2019 14:36
nix-shell file for building LineageOS
{ pkgs ? import <nixpkgs> {} }:
let
fhs = pkgs.buildFHSUserEnv {
name = "lineageos";
targetPkgs = pkgs: with pkgs; [
gitRepo
androidenv.androidPkgs_9_0.platform-tools
@kirelagin
kirelagin / openwrt-shell.nix
Created June 9, 2019 20:48
nix-shell file for building Openwrt
{ pkgs ? import <nixpkgs> {} }:
let
openwrt-env = pkgs.buildFHSUserEnv {
name = "openwrt";
targetPkgs = pkgs: with pkgs; [
which # NASTY FUCKER all over
pkgconfig # (make menuconfig -> ncurses)
autoconf
@kirelagin
kirelagin / safetynet.diff
Last active August 8, 2020 16:19
Android (Lineage OS) kernel patch for SafetyNet
diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c
index 14a4c5887848..ebce46d998b0 100644
--- a/fs/proc/cmdline.c
+++ b/fs/proc/cmdline.c
@@ -2,10 +2,13 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+#include <asm/setup.h>
+
@kirelagin
kirelagin / keybase.md
Created May 31, 2017 15:26
Keybase proof

Keybase proof

I hereby claim:

  • I am kirelagin on github.
  • I am kirelagin (https://keybase.io/kirelagin) on keybase.
  • I have a public key whose fingerprint is A06D BA82 A98E B35E 1815 5641 6C57 2FB9 88FA 45F2

To claim this, I am signing this object: