Skip to content

Instantly share code, notes, and snippets.

View antichris's full-sized avatar
🇺🇦
Russi, cedite illac quo navis bellica ivit

antichris

🇺🇦
Russi, cedite illac quo navis bellica ivit
View GitHub Profile
@antichris
antichris / secure-apt-keyring.sh
Created March 12, 2023 13:12
Move an `apt` keyring to the canonical storage and add as the signing keyring for a `sources.list.d/` entry.
#!/bin/sh -e
## This Source Code Form is subject to the terms of the Mozilla Public
## License, v. 2.0. If a copy of the MPL was not distributed with this
## file, You can obtain one at https://mozilla.org/MPL/2.0/.
self=$(basename "$(readlink -f "$0")")
krDir=/etc/apt/keyrings
usage=$(cat) <<***
@antichris
antichris / prompt-setup.sh
Created March 7, 2023 22:49
Alter a .bashrc file to enhance the shell prompt display
#!/bin/sh
## This Source Code Form is subject to the terms of the Mozilla Public
## License, v. 2.0. If a copy of the MPL was not distributed with this
## file, You can obtain one at https://mozilla.org/MPL/2.0/.
usage=$(cat) <<-***
Usage: $0 BASHRCFILE
Alter a .bashrc file to enhance the shell prompt display.
@antichris
antichris / Kyriakopoulos-2022.md
Last active October 9, 2022 12:02
Comment on “Potential Mechanisms for Human Genome Integration of Genetic Code from SARS-CoV-2 mRNA Vaccination”

Comment on “Potential Mechanisms for Human Genome Integration of Genetic Code from SARS-CoV-2 mRNA Vaccination”

Even a layperson, such as the author of this commentary, can spot the chunky inconsistency clumps in what [Kyriakopoulos et al., 2022] are serving. The reader is encouraged to put in writing what more can they find in addition to what is mentioned here.

Not all of them

The first red flag should immediately be the fact that one of the credited authors is a "naturopathic oncologist". See [Atwood, 2003], [Atwood, 2004], [Gorski, 2014], [Russell, 2009], [Ernst, 2001], [Wilson et al., 2004], [Busse et al., 2008], [Downey et al., 2010], [Herzog et al., 2013].

Imagine a "metaphysical firefighter" — "Yes, ma'am, what is it?... Your house is on fire?... I'll start meditating right away!"

@antichris
antichris / python-dependencies-suck.md
Last active September 1, 2022 10:56
Why Python dependency management sucks

Why Python dependency management sucks

Lack of a comprehensive official standard tool. "Comprehensive" being the key word here.

  • virtualenv
  • venv
  • pipenv
  • poetry
  • pdm
  • (ana)conda
@antichris
antichris / gofre.sh
Last active August 20, 2022 18:41
A script to update an executable that has been installed to GOBIN with "go install"
#!/bin/sh -e
## This Source Code Form is subject to the terms of the Mozilla Public
## License, v. 2.0. If a copy of the MPL was not distributed with this
## file, You can obtain one at https://mozilla.org/MPL/2.0/.
self=$(basename "$0")
usage=$(cat) <<***
Usage: $self [OPTIONS] COMMAND [VERSION]
@antichris
antichris / comparison.md
Created May 6, 2022 11:11
Emitting binary from POSIX shell scripts

Emitting binary from POSIX shell scripts

Different (supposedly) POSIX compliant shell environments yield varied results when asked to emit non-printable characters. But there is one method that works consistently across a wide variety of shells.

Sparked by [this conversation][thread].

Comparison

Given

OSInt on 2022-03-14 9M79 Tochka-U at Donetsk

The Russian sources claim that the missile was launched by Ukranian forces. The Ukranian sources claim it was a false flag operation by Russians themselves.

This investigation reveals that the former is highly unlikely, as the engine end of the the 9M79 Tochka-U missile, the range of which is up to 120 km, appears to have traveled from the approximate bearing of 148° southeast by south, which falls far within the Donbas territory of Ukraine that the Russian forces siezed in 2014, and exends farther on into Russia, to area near Rostov-on-Don.

The remains of the missile may have been moved by individuals in Donetsk to incriminate Russian forces, but, in addition to the absurdity of tampering with the evidence to shift the blame towards their own side of allegiance (although, never underestimate Russihuman incompetence), there are no visible signs of this being the case.

Geolocating

@antichris
antichris / tools.go.md
Last active February 23, 2022 16:49
Adding tools to your Go module

I think I'll just summarize my findings down here; it didn't all seem obvious and took some googling and tinkering, as some sources are a bit ambiguous on some of the points.

All native: tools.go

The best practice as endorsed by the Go team (golang/go#25922 (comment)).

//go:build tools
// +build tools
@antichris
antichris / mvru.sh
Last active September 20, 2023 03:00
A POSIX-compliant recursive "mv --update", like "cp -ru" but moving instead of copying.
#!/bin/sh
## This Source Code Form is subject to the terms of the Mozilla Public
## License, v. 2.0. If a copy of the MPL was not distributed with this
## file, You can obtain one at https://mozilla.org/MPL/2.0/.
usage=$(cat) <<***
Usage: $0 SOURCE DEST
Perform a recursive "mv -u", like "cp -ru" but moving instead of copying.
@antichris
antichris / ytLiveChatTakeout.js
Last active March 29, 2021 09:55
Separate the chats of different livestream events in a YouTube Live Chat history (as exported by Google Takeout) with buttons that embed the respective streams.
(d=>{
const ce = n=>d.createElement(n), ac = (p,c)=>p.appendChild(c), an = (p,n)=>ac(p, ce(n))
let p;
[].forEach.call(d.querySelectorAll('li'), e=>{
a = e.querySelector('a');
if (!a || a.href == p) { return; }
p = a.href;
const t = ce('li'), b = an(an(e.parentNode.insertBefore(t, e), 'h1'), 'button')
ac(b, document.createTextNode(p.split('?v=')[1]));
b.addEventListener('click', ev=>b.outerHTML = '<iframe width=560 height=315 src=https://www.youtube.com/embed/' + b.textContent