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
dmilith / Cargo.toml
Last active Feb 18, 2020
Rust + WASM project, common consts splitted as 2 "features": production and development
View Cargo.toml
[features]
development = []
production = []
@dmilith
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
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
Passphrase:
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
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:
libwatchdog_mongod.so => /Software/Mongodb/lib/libwatchdog_mongod.so (0x80154c000)
libwatchdog.so => /Software/Mongodb/lib/libwatchdog.so (0x80157a000)
liboptions_parser_init.so => /Software/Mongodb/lib/liboptions_parser_init.so (0x80158b000)
libversion_impl.so => /Software/Mongodb/lib/libversion_impl.so (0x801593000)
libntservice.so => /Software/Mongodb/lib/libntservice.so (0x80159b000)
libsignal_handlers.so => /Software/Mongodb/lib/libsignal_handlers.so (0x80159f000)
liblog_process_details.so => /Software/Mongodb/lib/liblog_process_details.so (0x8015a6000)
libtransport_layer_manager.so => /Software/Mongodb/lib/libtransport_layer_manager.so (0x8015ae000)
@dmilith
dmilith / 11.2
Created Nov 11, 2019
redis bench #2
View 11.2
[1573506212] cb2:~ λ redis-benchmark -h 127.0.0.1 -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
dmilith / results.txt
Created Nov 11, 2019
Redis benchmark on 11.2-vks vs 12.1-vks
View results.txt
11.2:
[1573504676] kenny:~ λ redis-benchmark -h 127.0.0.1 -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
dmilith / kernel-config
Last active Nov 11, 2019
src.conf + make.conf => hardened/12-stable => 12.1
View kernel-config
# ServeD:
cpu HAMMER
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/bsd.cpu.mk for list of supported values:
# NOTE: these values might be replaced by build-all for cross compiling:
CPUTYPE?=ivybridge
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
#-DEVP_F_EVP_DECRYPTUPDATE=181 -DEVP_F_EVP_ENCRYPTUPDATE=180 -DDEVF_RESET_DETACH=0x0000001 -DDEV_RESET=0x00000400
# wrap compiler with ccache
@dmilith
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/Skype.app/Contents/Resources/app.asar /Applications/Skype.app/Contents/Resources/app`
4. Run: `rm -f /Applications/Skype.app/Contents/Resources/app.asar`
That's it, now you can open Skype internal files directly by doing:
`open /Applications/Skype.app/Contents/Resources/app`
View studio-snapshot.sh
studio-snapshot () {
dataset="$1"
. /Software/Sofin/share/loader
if [ -z "${dataset}" ]; then
error "No Studio dataset name specified!"
else
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.