Skip to content

Instantly share code, notes, and snippets.

@0xack13
0xack13 / flink-quickstart-scala.sh
Created July 13, 2024 19:49 — forked from cesarcneto/flink-quickstart-scala.sh
Create an apache-flink scala project using the provided quickstart archetype
@0xack13
0xack13 / ca.md
Created February 11, 2024 02:26 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@0xack13
0xack13 / nix-shell-shebang.md
Created January 26, 2024 00:45 — forked from travisbhartwell/nix-shell-shebang.md
nix-shell and Shebang Lines

NOTE: a more up-to-date version of this can be found on my blog

nix-shell and Shebang Lines

A few days ago, version 1.9 of the Nix package manager was released. From the release notes:

nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.

@0xack13
0xack13 / bash_flock.sh
Created January 25, 2024 05:07 — forked from jpclipffel/bash_flock.sh
Bash flock example
#!/bin/bash
#
# Bash `flock` example.
# Works on: Linux, BSD
# Doesn't work on: MacOS
# The file which represent the lock.
LOCKFILE="`basename $0`.lock"
# Timeout in seconds.
@0xack13
0xack13 / nix_inputs.md
Created January 20, 2024 21:36 — forked from CMCDragonkai/nix_inputs.md
Understanding Nix Inputs #nix

Understanding Nix Inputs

Every Nix derivation produces a Nix store output that has 3 things:

  • Executables
  • Libraries
  • Data

Executables are always exported using the PATH environment variable. This is pretty much automatic.

@0xack13
0xack13 / vagrant-vmware-tech-preview-apple-m1-pro.md
Created January 20, 2024 18:15 — forked from sbailliez/vagrant-vmware-tech-preview-apple-m1-pro.md
Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

UPDATE November 20, 2022: VMWare Fusion 13

VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.

Summary

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated

@0xack13
0xack13 / urandom_music.sh
Created January 14, 2024 04:21 — forked from aweijnitz/urandom_music.sh
Music from /dev/urandom on Mac OSX
# I really enjoyed "Bash One Liner - Compose Music From Entropy in /dev/urandom"
# From http://blog.robertelder.org/bash-one-liner-compose-music/
#
# This is a collection of one liners that work on Mac OSX
# You need sox
brew install sox
# Major scale
cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("0,2,4,5,7,9,11,12",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(1382*exp((a[$1 % 8]/12)*log(2))*i)) }' | xxd -r -p | sox -v 0.25 -traw -r16000 -b32 -e signed-integer - -tcoreaudio
@0xack13
0xack13 / arch_linux_installation.md
Created January 14, 2024 04:15 — forked from orhun/arch_linux_installation.md
Notes on my Arch Linux installation: UEFI/Secure Boot + systemd-boot, LUKS-encrypted root (XFS), LUKS-encrypted swap (with hibernate & unlocked via TPM)
@0xack13
0xack13 / pr.md
Created January 11, 2024 02:05 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@0xack13
0xack13 / run.sh
Created December 24, 2023 22:17 — forked from romanhaa/run.sh
macOS settings
# https://macos-defaults.com/
# https://www.defaults-write.com
# reset with: defaults delete -g <FEATURE>
# dock
# position
defaults write com.apple.dock "orientation" -string "right"
# icon size
defaults write com.apple.dock "tilesize" -int "36"