Skip to content

Instantly share code, notes, and snippets.

@adfaklsdjf
adfaklsdjf / progresscopy
Created February 22, 2024 23:50
copy files with a 'pv' progress bar and rate info
#!/bin/bash
# Ensure that at least two arguments are provided (source(s) and destination)
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <source1> [<source2> ...] <destination>"
exit 1
fi
# The last argument is the destination
destination="${@: -1}"
@adfaklsdjf
adfaklsdjf / gist:d9c7bd7ad9681c278e70b5d8372d4b7a
Created March 19, 2023 14:32
"Grabby Aliens" and the early humanity assumption
Model: GPT-4
b*****@gmail.com
how long have Population I stars existed? i.e how long after the big bang did they arise?
ChatGPT
Population I stars are metal-rich stars that are generally younger than other star populations. They started to form a few billion years after the Big Bang, which occurred around 13.8 billion years ago.
The first stars, known as Population III stars, formed about 200 million years after the Big Bang. These stars were made almost entirely of hydrogen and helium, with trace amounts of lithium. They were short-lived, massive, and very hot, eventually dying in supernova explosions. The deaths of these Population III stars released heavier elements into the interstellar medium.
@adfaklsdjf
adfaklsdjf / h264
Created August 10, 2022 13:42
ffmpeg bash function for compressing a video to h264
h264 ()
{
if [[ -z $1 ]]; then
echo;
echo "Usage: $0 <file> [preset]";
echo;
echo;
exit 1;
fi;
if [[ -z $2 ]]; then
@adfaklsdjf
adfaklsdjf / phpv
Last active February 7, 2022 22:14
Swap PHP 'brew' packages
#!/usr/bin/env bash
set -eoiu pipefail
HOMEBREW_PKG_PATH="/usr/local/Cellar";
unset CLICOLOR_FORCE; # 'ls' with color breaks things
echo; # Always start with a blank line.
@adfaklsdjf
adfaklsdjf / keybase.md
Created May 20, 2018 20:28
keybase.md

Keybase proof

I hereby claim:

  • I am adfaklsdjf on github.
  • I am adfaklsdjf (https://keybase.io/adfaklsdjf) on keybase.
  • I have a public key ASBNdUhVFkoFr7gAu-Vr-oHthyQVHAJTPMoTCadJHBmkiQo

To claim this, I am signing this object: