Skip to content

Instantly share code, notes, and snippets.

View skull-squadron's full-sized avatar
💭
*aaS unreleased project in Elixir, Rust, Typescript, Kafka, and k8s

🏴‍☠️ skull-squadron

💭
*aaS unreleased project in Elixir, Rust, Typescript, Kafka, and k8s
  • (stealth)
  • ATX
  • 08:02 (UTC -06:00)
View GitHub Profile
@skull-squadron
skull-squadron / iso_from_files_and_folders.sh
Last active December 12, 2015 02:59
turn files and folders into an iso (put this into an applescript)
vol_name="`basename \\"$1\\"`"
iso="$vol_name.iso"
counter=1
while [ -e "$iso" ]; do
counter=$[counter+1]
iso="$vol_name $counter.iso"
done
hdiutil makehybrid -iso -joliet -o "$iso" "$@"
@skull-squadron
skull-squadron / gist:5021854
Created February 23, 2013 23:34
list all installed package groups on el redhat / fedora
yum grouplist | sed -n '1,/^Installed Groups:/d;/^Available Groups:/q;s/^ *//g;p'
@skull-squadron
skull-squadron / google.crt
Last active April 9, 2017 17:24
Am I smoking crack or does VERIFY_PEER plain not work on 1.8.7 and 1.9.3?
#!/usr/bin/env ruby
require 'openssl'
require 'uri'
require 'net/http'
url = URI.parse 'https://rubygems.org/'
http = Net::HTTP.new url.host, url.port
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.read_timeout = 20
@skull-squadron
skull-squadron / reading-list.md
Last active February 21, 2023 17:46
Language design reading list
@skull-squadron
skull-squadron / winget-upgrade-all.ps1
Last active March 15, 2023 03:50
Windows Workaround a bug in winget that prevents upgrade --all from working
$output = winget upgrade | Out-String
$lines = $output.Split([Environment]::NewLine)
$hdrLine = 0
while (-not $lines[$hdrLine].StartsWith("Name")) {
$hdrLine++
}
$idIdx = $lines[$hdrLine].IndexOf("Id")
@skull-squadron
skull-squadron / make-relative-bin.sh
Last active March 18, 2023 02:36
Linux utility: Remove hard-coded absolute library paths and set a single DT_RUNPATH
#!/usr/bin/env bash
set -euo pipefail
TGT="$1"
NEW_RUNPATH="${2:-\$ORIGIN/../lib}"
_patchelf() {
(set -x; patchelf "$@")
}
@skull-squadron
skull-squadron / list.md
Created April 18, 2023 21:40
Way more than awesome OS development references

I would learn C and x86/arm assembly first enough to bootstrap.

It's usually good to learn how to write ld linker scripts and how to make something bootable from grub.

Then, I would look Rust because it's easier to create correct no_std kernels.

https://os.phil-opp.com/

arm architecture and instruction (ISA) reference

@skull-squadron
skull-squadron / gpgme.patch
Created April 21, 2023 01:32
gpgme for Mailvelope
diff --git a/Formula/gpgme.rb b/Formula/gpgme.rb
index 45abd0b45ca..cbb56d52864 100644
--- a/Formula/gpgme.rb
+++ b/Formula/gpgme.rb
@@ -49,6 +49,7 @@ class Gpgme < Formula
"\\0 --install-lib=#{site_packages}"
system "./configure", *std_configure_args,
+ "--enable-fixed-path=#{Formula["gnupg"].opt_bin}",
"--disable-silent-rules",
@skull-squadron
skull-squadron / captive-portal-detection-and-internet-presence.md
Created May 16, 2023 20:30
Captive portal detection and internet presence URLs by vendor
@skull-squadron
skull-squadron / megamaid.cr
Created May 22, 2023 06:06
1 M fibers running in Crystal
NUM_FIBERS = 1_000_000 # no. of Fibers
UPDATE_INTERVAL = 10_000 # show starting progress every these many fibers
PRINTERS = 100 # at most these no. of fibers will print dots
PRINT_INTERVAL = 10 # every increments of x
PRINT_NTH_FIBER = NUM_FIBERS//PRINTERS
MINI_NAP = Time::Span.new(nanoseconds: 1_000_000)
GC_STATS_PERIOD = Time::Span.new(seconds: 10)
start = Time.utc