Skip to content

Instantly share code, notes, and snippets.

View zzamboni's full-sized avatar
:octocat:

Diego Zamboni zzamboni

:octocat:
View GitHub Profile
@zzamboni
zzamboni / -
Created November 22, 2017 14:20
6035 build/Debug-build.log
@zzamboni
zzamboni / -
Created November 22, 2017 16:25
[~/D/P/d/h/hammerspoon]─[⎇ master]─> make
mkdir -p build
echo "Building Hammerspoon in Debug configuration"
Building Hammerspoon in Debug configuration
rm -rf build/Hammerspoon.app
xcodebuild -workspace Hammerspoon.xcworkspace -scheme Hammerspoon -configuration Debug clean build > build/Debug-build.log
** BUILD FAILED **
The following build commands failed:
@zzamboni
zzamboni / -
Created December 19, 2017 15:45
Exception: variable $edit: not found
Traceback:
<builtin module>, line 2:
$b Ctrl-A $edit:&move-dot-sol
<builtin module>, line 1-27:
b=[k f]{ edit:insert:binding[$k] = $f } {
$b Ctrl-A $edit:&move-dot-sol
$b Ctrl-B $edit:&move-dot-left
$b Ctrl-D {
if (> (count $edit:current-command) 0) {
@zzamboni
zzamboni / -
Created January 24, 2018 09:52
[~]─> otool -L /usr/local/bin/elvish
/usr/local/bin/elvish:
/nix/store/zmhbm5m3wwk2h3vr3l4hdzxzccqbc5xg-Libsystem-osx-10.11.6/lib/libSystem.B.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/zmhbm5m3wwk2h3vr3l4hdzxzccqbc5xg-Libsystem-osx-10.11.6/lib/libSystem.B.dylib (compatibility version 0.0.0, current version 0.0.0)
/nix/store/zmhbm5m3wwk2h3vr3l4hdzxzccqbc5xg-Libsystem-osx-10.11.6/lib/libSystem.B.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 0.0.0, current version 0.0.0)
/nix/store/zmhbm5m3wwk2h3vr3l4hdzxzccqbc5xg-Libsystem-osx-10.11.6/lib/libSystem.B.dylib (compatibility version 0.0.0, current version 0.0.0)
@zzamboni
zzamboni / -
Created January 24, 2018 10:49
root@linuxvm:~# ps -aef | grep elvish
root 2797 2381 0 11:40 pts/17 00:00:00 ./elvish-linux-amd64
root 2800 2797 0 11:40 ? 00:00:00 /root/elvish-linux-amd64 -daemon -bin /root/elvish-linux-amd64 -db /root/.elvish/db -sock /tmp/elvish-0/sock -logprefix /tmp/elvish-0/daemon.log-
root 3257 2831 0 11:43 pts/0 00:00:00 grep --color=auto elvish
root@linuxvm:~# lsof -p 2797
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
elvish-li 2797 root cwd DIR 252,0 4096 1703937 /root
elvish-li 2797 root rtd DIR 252,0 4096 2 /
elvish-li 2797 root txt REG 252,0 12209766 1704044 /root/elvish-linux-amd64
elvish-li 2797 root 0u CHR 136,17 0t0 20 /dev/pts/17
runtime error: slice bounds out of range
goroutine 1 [running]:
github.com/elves/elvish/sys.DumpStack(0xc4208f8ea0, 0x1)
/private/tmp/elvish-20180125-63628-48655e/src/github.com/elves/elvish/sys/dumpstack.go:10 +0xa2
github.com/elves/elvish/program/shell.rescue()
/private/tmp/elvish-20180125-63628-48655e/src/github.com/elves/elvish/program/shell/shell.go:59 +0xd2
panic(0x1491720, 0x17c6c80)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/panic.go:491 +0x283
github.com/elves/elvish/edit/ui.(*Buffer).TrimToLines(0xc420202aa0, 0xffffffffffffffff, 0x1)
/private/tmp/elvish-20180125-63628-48655e/src/github.com/elves/elvish/edit/ui/buffer.go:192 +0x1a3
@zzamboni
zzamboni / -
Created February 10, 2018 17:01
[~]─>
runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
github.com/elves/elvish/sys.DumpStack(0xc42004ad18, 0x1)
/private/tmp/elvish-20180210-85656-1lgfedb/src/github.com/elves/elvish/sys/dumpstack.go:10 +0xa2
github.com/elves/elvish/program/shell.rescue()
/private/tmp/elvish-20180210-85656-1lgfedb/src/github.com/elves/elvish/program/shell/shell.go:59 +0xd2
panic(0x14911c0, 0x17c5350)
/usr/local/Cellar/go/1.9.4/libexec/src/runtime/panic.go:491 +0x283
@zzamboni
zzamboni / -
Created February 22, 2018 16:12
For reference, I these are my currently-defined aliases:
#+begin_src elvish :tangle no
use github.com/zzamboni/elvish-modules/alias
alias:list
#+end_src
#+RESULTS:
: alias:def cd dir:cd
: alias:def cdb dir:cdb
aliases = [&]
fn _load_alias [name file]{
alias = [&]
-source $file
aliases[$name] = $alias[$name]
}
fn def [&verbose=false name @cmd]{
file = $dir/$name.elv
[~/.elvish]─[⎇ master]─[✎ ]─> cat lib/test.elv
modvar = a
fn test [arg]{
echo "echo arg=$arg" > /tmp/sourced0.elv
-source /tmp/sourced0.elv
fnvar = b
echo "echo fnvar=$fnvar" > /tmp/sourced1.elv
-source /tmp/sourced1.elv
echo "echo modvar=$modvar" > /tmp/sourced2.elv