Skip to content

Instantly share code, notes, and snippets.

Calculating infinity…

Daniel (dmilith) Dettlaff dmilith

Calculating infinity…
Block or report user

Report or block dmilith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dmilith / Cargo.toml
Last active Feb 18, 2020
Rust + WASM project, common consts splitted as 2 "features": production and development
View Cargo.toml
development = []
production = []
dmilith / .tmux.conf
Last active Jan 2, 2020
My tmux setup for workstation (tmux is used as shell replacement here)
View .tmux.conf
# color scheme (style based on vim-powerline)
setw -g status-left-length 52
setw -g status-right-length 451
setw -g status-fg colour35
setw -g status-bg colour234
setw -g window-status-format '#[fg=colour69,bg=colour234] #I #W '
setw -g window-status-current-format '#[fg=colour234,bg=colour39]#[fg=colour65,bg=colour235,noreverse,bold] #I #W #[fg=colour69,bg=colour235,nobold]'
set -g default-terminal "tmux-256color"
dmilith / gist:365fad2ffa2891f3c25bfffb2ce5c02b
Created Dec 24, 2019
Short story how "reliable" APFS is…
View gist:365fad2ffa2891f3c25bfffb2ce5c02b
catie:/Projects/small (master) ✓ ⇢ sudo diskutil mount -mountPoint /usr/local /dev/disk1s9
Volume on disk1s9 failed to mount
Perhaps the operation is not allowed by the invoking user (kDAReturnNotPrivileged)
This appears to be an APFS Volume; note that locked APFS volumes
will not mount unless unlocked (e.g. "diskutil apfs unlockVolume")
catie:/Projects/small (master) ✓ ⇢ sudo diskutil apfs unlockVolume Local
Unlocking any cryptographic user on APFS Volume disk1s9
Error unlocking APFS Volume: The given APFS Volume is not encrypted (-69593)
catie:/Projects/small (master) ✓ ⇢ sudo diskutil mount -mountPoint /usr/local /dev/disk1s9
dmilith / Mongodb 4.2.2
Created Dec 15, 2019
And the winner is…
View Mongodb 4.2.2
[1576419332] cb4-bh:~ λ ldd `which mongod`
/Software/Mongodb/exports/mongod: => /Software/Mongodb/lib/ (0x80154c000) => /Software/Mongodb/lib/ (0x80157a000) => /Software/Mongodb/lib/ (0x80158b000) => /Software/Mongodb/lib/ (0x801593000) => /Software/Mongodb/lib/ (0x80159b000) => /Software/Mongodb/lib/ (0x80159f000) => /Software/Mongodb/lib/ (0x8015a6000) => /Software/Mongodb/lib/ (0x8015ae000)
dmilith / 11.2
Created Nov 11, 2019
redis bench #2
View 11.2
[1573506212] cb2:~ λ redis-benchmark -h -q -n 1000 -c 10 -P 5
PING_INLINE: 66666.66 requests per second
PING_BULK: 66666.66 requests per second
SET: 71428.57 requests per second
GET: 66666.66 requests per second
INCR: 66666.66 requests per second
LPUSH: 66666.66 requests per second
RPUSH: 66666.66 requests per second
LPOP: 66666.66 requests per second
RPOP: 71428.57 requests per second
dmilith / results.txt
Created Nov 11, 2019
Redis benchmark on 11.2-vks vs 12.1-vks
View results.txt
[1573504676] kenny:~ λ redis-benchmark -h -q -n 1000 -c 10 -P 5
PING_INLINE: 33333.33 requests per second
PING_BULK: 35714.29 requests per second
SET: 24390.24 requests per second
GET: 25000.00 requests per second
INCR: 30303.03 requests per second
LPUSH: 27027.03 requests per second
RPUSH: 32258.06 requests per second
dmilith / kernel-config
Last active Nov 11, 2019
src.conf + make.conf => hardened/12-stable => 12.1
View kernel-config
# ServeD:
ident VerKnowSys
makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support
options SCHED_ULE # ULE scheduler
options NUMA # Non-Uniform Memory Architecture support
options PREEMPTION # Enable kernel thread preemption
View make.conf
# share/mk/ for list of supported values:
# NOTE: these values might be replaced by build-all for cross compiling:
CFLAGS+=-O2 -w -pipe -funroll-loops -fno-omit-frame-pointer -fno-strict-aliasing
CXXFLAGS+=-O2 -w -pipe -funroll-loops -fno-omit-frame-pointer -fno-strict-aliasing
COPTFLAGS+=-O2 -pipe -funroll-loops -fno-strict-aliasing
# wrap compiler with ccache
dmilith / gist:3e928403aaa5fccbe7b8c7e370d5f1c5
Created May 26, 2019
hack Skype 8.x sounds (including replace files, remove files for notification to shutup, and so on) for Mac OSX
View gist:3e928403aaa5fccbe7b8c7e370d5f1c5
0. Shutdown Skype
1. Install Nodejs, open Terminal
2. Run: `npm install -g asar`
3. Run: `npx asar extract /Applications/ /Applications/`
4. Run: `rm -f /Applications/`
That's it, now you can open Skype internal files directly by doing:
`open /Applications/`
studio-snapshot () {
. /Software/Sofin/share/loader
if [ -z "${dataset}" ]; then
error "No Studio dataset name specified!"
stamp="$(date +%F_%H:%M:%S 2>/dev/null)" && \
zfs snapshot "Studio/${dataset}@${stamp}" && \
permnote "Snapshot successfully created for: $(distn "Studio/${dataset}@${stamp}")"
ping -c1 losbandos >/dev/null 2>&1
You can’t perform that action at this time.