Skip to content

Instantly share code, notes, and snippets.

@frenata
frenata / Alacritty.command
Last active January 8, 2024 21:12
OSX reset nix commands
# ~/Desktop/Alacritty.command
~/reset-nix.sh
alacritty &
exit
# ~/.config/nixpkgs/config.nix
# use like: nix-env -iA nixpkgs.tools
{
packageOverrides = pkgs: with pkgs; {
tools = pkgs.buildEnv {
name = "standard";
paths = [
httpie
tmux
@frenata
frenata / .cshrc
Last active October 19, 2023 14:14
freebsd setup
eval `ssh-agent`
-- 0. create and install OpenBSD on QEMU
host$ qemu-img create openbsd.img 10G
host$ qemu-system-x86_64.exe -hda .\openbsd.img -boot d -cdrom .\<BSD_INSTALL_IMG>.iso -m 1024
bsd$ <INSTALL BSD AND THEN HALT>
host$ qemu-system-x86_64.exe -drive file=openbsd.img,if=virtio,format=raw -boot c -m 1024 -net nic -net user,hostfwd=tcp::2222-:22 -nographic -monitor telnet::45454,server,nowait -serial mon:stdio
host$ ssh <USER>@localhost -p 2222
-- 1. configure doas
bsd$ su
bsd# echo permit :wheel > /etc/doas.conf
@frenata
frenata / allowlist
Last active January 5, 2023 19:27
blocklist bypass
twitter
twimg
linkedin
licdn
t.co
__foo = None
class Foo:
def __init__(self, x):
self.x = x
def init_global_foo(x):
global __foo
__foo = Foo(x)
@frenata
frenata / with_handlers.yaml
Last active April 1, 2022 20:09
conditionally restart systemd unit files via ansible, two styles
tasks:
- name: specify a systemd unit file
become: true
copy:
src: foo.service
dest: /etc/systemd/system
notify: restart foo
- name: enable the systemd unit file
become: true
# This is Git's per-user configuration file.
[alias]
hist = log --all --decorate --oneline --graph
up = !git checkout master && git pull && git checkout - && git rebase master
pf = push --force-with-lease
bs = branch -v
grep-all = !git grep $1 $(git rev-list --all)
code-changes = "!git log --format=format: --name-only | egrep -v '^$' | sort | uniq -c | sort -rg | head -10"
cc = "!git code-changes"
(require '[clojure.string :as str])
(defn freq [s] (-> s str/lower-case (str/replace #"\s" "") frequencies))
(defn occurs [s c] ((freq s) c))
(occurs "Hello World" \h)
@frenata
frenata / Wahoo_Elemnt.md
Created February 25, 2021 16:49 — forked from Intyre/Wahoo_Elemnt.md
Wahoo Elemnt - Tips, tricks and custom images