This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__foo = None | |
class Foo: | |
def __init__(self, x): | |
self.x = x | |
def init_global_foo(x): | |
global __foo | |
__foo = Foo(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
twimg | |
licdn | |
t.co |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval `ssh-agent` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.config/nixpkgs/config.nix | |
# use like: nix-env -iA nixpkgs.tools | |
{ | |
packageOverrides = pkgs: with pkgs; { | |
tools = pkgs.buildEnv { | |
name = "standard"; | |
paths = [ | |
httpie | |
tmux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/Desktop/Alacritty.command | |
~/reset-nix.sh | |
alacritty & | |
exit |