Skip to content

Instantly share code, notes, and snippets.

View erplsf's full-sized avatar
🤔

Andriy Mykhaylyk erplsf

🤔
View GitHub Profile
binary was built under nixos, against 8bcb962ada2ea5cfeeff303e1063937ee13af6ad.
to reproduce:
1. `zig build-exe test.zig`
2. `valgrind ./test`
3. observe that there are no names of functions
4. `valgrind --tool=callgrind ./test`
5. `kcachegrind`
6. observe that the call stack doesn't show any names.
@erplsf
erplsf / keybase.md
Created December 12, 2018 11:03
Keybase proof

Keybase proof

I hereby claim:

  • I am erplsf on github.
  • I am erp_lsf (https://keybase.io/erp_lsf) on keybase.
  • I have a public key ASAodIS-lq8FcAFrmgPNEpaJ84maFwkjctXBl5DEd9MjJAo

To claim this, I am signing this object:

@erplsf
erplsf / gcb.zsh
Created November 22, 2018 15:57
checkout with date
function _git_special_checkout() {
git checkout -b "$(date +%Y%m%d)_$1"
}
alias gcb='_git_special_checkout'
@erplsf
erplsf / pbu.zsh
Last active December 5, 2018 12:55
Update revisions.
function pbu() {
# save branch to go back later
(git rev-parse --abbrev-ref HEAD)
current_branch=$?
# check for changes to decide if we want to stash them
(git diff-index --quiet HEAD --)
changes_present=$?
if [[ $changes_present -ne 0 ]]; then
@erplsf
erplsf / shatter.rb
Last active June 26, 2018 14:03
manage ssh config
#!/bin/ruby
def parse_config(config)
hash = {}
results = config.scan(REGEXP)
results.each do |subarray|
hash[subarray[1]] = subarray[2].split("\n").map {|el|
ar = el.split
[ar.shift, ar.join(' ')]}.inject({}) {|h, a| h[a[0]] = a[1]; h}
end