Skip to content

Instantly share code, notes, and snippets.

@mys721tx
mys721tx / sudo.patch
Created March 31, 2023 17:54
Enabling TouchID support for sudo on Mac
--- /etc/pam.d/sudo 2023-03-31 09:17:20.230708973 -0700
+++ sudo 2023-03-31 09:14:05.772051938 -0700
@@ -1,4 +1,6 @@
# sudo: auth account password session
+auth optional /opt/homebrew/lib/pam/pam_reattach.so ignore_ssh
+auth sufficient pam_tid.so
auth sufficient pam_smartcard.so
auth required pam_opendirectory.so
account required pam_permit.so
@mys721tx
mys721tx / iss_tle.R
Last active June 13, 2022 11:22
ISS ground track plotter
library(tidyverse)
library(asteRisk)
library(ggmap)
library(lubridate)
getLatestSpaceData()
iss_tle <- read_file(
"https://celestrak.com/NORAD/elements/gp.php?CATNR=25544&FORMAT=tle"
) %>%
@mys721tx
mys721tx / kittens.js
Created January 4, 2021 04:04
Kitten Game
can_build = (b) => {
c = gamePage.bld.getPrices(b).map(
(p) => {
if (!gamePage.resPool.get(p.name).unlocked) {
return false
}
if (gamePage.resPool.get(p.name).maxValue === 0) {
if (gamePage.bld.get(b).val < 200) {
return true
}
@mys721tx
mys721tx / output.log
Created January 30, 2020 06:08
Yay output
yay ffmpeg-full  1 ↵  938
4 aur/ffmpeg-full3.4 3.4.2-1 (+2 0.00%)
FFmpeg 3.4, designed to fix linking issues with packages that require this version of FFmpeg.
3 aur/ffmpeg-full-git 4.3.r96529.gd89f69e142-1 (+11 0.18%)
Complete solution to record, convert and stream audio and video (all possible features including libfdk-aac; git version)
2 aur/ffmpeg-full-nvenc 1:4.2.2-1 (+29 0.03%)
Record, convert, and stream audio and video (all codecs including Nvidia NVENC)
1 aur/ffmpeg-full 4.2.2-2 (+78 0.02%)
Complete solution to record, convert and stream audio and video (all possible features including libfdk-aac)
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
@mys721tx
mys721tx / dnsbl.conf
Last active May 24, 2019 00:16
unbound DNS Blocklist forwarding
# vi: ft=conf
stub-zone:
name: "zen.spamhaus.org"
stub-prime: yes
stub-host: a.gns.spamhaus.org
stub-host: b.gns.spamhaus.org
stub-host: c.gns.spamhaus.org
stub-host: d.gns.spamhaus.org
stub-host: e.gns.spamhaus.org
stub-zone:
@mys721tx
mys721tx / efi.sh
Last active May 20, 2019 17:13
Generate UEFI boot entry for EFISTUB kernel
#!/bin/bash
BOOTDISK="/dev/sda"
BOOTPART="1"
ROOT="/dev/sda3"
ROOTUUID="$(blkid -s PARTUUID -o value $ROOT)"
KERNEL="linux"
efibootmgr --disk "${BOOTDISK}" --part "${BOOTPART}" \
desc: (none)
cmd: ./vsearch --derep_fulllength test-identical.fasta --sizein --sizeout --output test-identical.fasta.derep.fasta
time_unit: i
#-----------
snapshot=0
#-----------
time=0
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=0
@mys721tx
mys721tx / ident.go
Created August 24, 2018 17:07
Test Sequence Generator
package main
import (
"bufio"
"math/rand"
"os"
"github.com/biogo/biogo/alphabet"
"github.com/biogo/biogo/io/seqio/fasta"
"github.com/biogo/biogo/seq/linear"
@mys721tx
mys721tx / make.log
Created August 24, 2018 14:49
VSEARCH make log
make all-recursive
make[1]: Entering directory '/home/mys_721tx/vsearch'
Making all in src
make[2]: Entering directory '/home/mys_721tx/vsearch/src'
g++ -DHAVE_CONFIG_H -I. -I.. -Wall -Wsign-compare -O3 -g -msse2 -g -march=native -MT libcpu_sse2_a-cpu.o -MD -MP -MF .deps/libcpu_sse2_a-cpu.Tpo -c -o libcpu_sse2_a-cpu.o `test -f 'cpu.cc' || echo './'`cpu.cc
mv -f .deps/libcpu_sse2_a-cpu.Tpo .deps/libcpu_sse2_a-cpu.Po
rm -f libcpu_sse2.a
ar cru libcpu_sse2.a libcpu_sse2_a-cpu.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libcpu_sse2.a
@mys721tx
mys721tx / massif.out.15f715a
Last active August 23, 2018 21:08
derep_fulllength heap profile
desc: (none)
cmd: ./vsearch --derep_fulllength all.fasta --sizein --sizeout --output all.derep.test.fasta
time_unit: i
#-----------
snapshot=0
#-----------
time=0
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=0