Skip to content

Instantly share code, notes, and snippets.

View zzamboni's full-sized avatar
:octocat:

Diego Zamboni zzamboni

:octocat:
View GitHub Profile
This file has been truncated, but you can view the full file.
logged: server *esup-server*, connection *esup-server* <127.0.0.1:53851>, message accept from -
name: *esup-server* <127.0.0.1:53851>, sentinel: proc: *esup-server* <127.0.0.1:53851>, event open from -
logged: server *esup-server*, connection *esup-server* <127.0.0.1:53852>, message accept from -
name: *esup-server* <127.0.0.1:53852>, sentinel: proc: *esup-server* <127.0.0.1:53852>, event open from -
Set information from port 53851 to be the log process
LOG: starting esup-child on '/Users/taazadi1/.emacs.d/init.el' port=53850 max-depth=2
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
remove-text-properties(nil 135 (markdown-tilde-fence-begin nil markdown-tilde-fence-end nil markdown-fenced-code nil markdown-yaml-metadata-begin nil markdown-yaml-metadata-end nil markdown-yaml-metadata-section nil markdown-gfm-block-begin nil markdown-gfm-block-end nil markdown-gfm-code nil markdown-list-item nil markdown-pre nil markdown-blockquote nil markdown-hr nil markdown-comment nil markdown-heading nil markdown-heading-1-setext nil markdown-heading-2-setext nil markdown-heading-1-atx nil markdown-heading-2-atx nil markdown-heading-3-atx nil markdown-heading-4-atx nil markdown-heading-5-atx nil markdown-heading-6-atx nil markdown-metadata-key nil markdown-metadata-value nil ...))
markdown-syntax-propertize-comments(129 136)
markdown-syntax-propertize-comments(124 136)
markdown-syntax-propertize(124 136)
markdown-font-lock-extend-region-function(135 136 0)
run-hook-with-args(markdown-font-lock-extend-region-functio
runtime error: index out of range
goroutine 1 [running]:
github.com/elves/elvish/sys.DumpStack(0xc42060edd0, 0x1)
/Users/taazadi1/Personal/devel/go/src/github.com/elves/elvish/sys/dumpstack.go:10 +0xa2
github.com/elves/elvish/program/shell.rescue()
/Users/taazadi1/Personal/devel/go/src/github.com/elves/elvish/program/shell/shell.go:59 +0xd2
panic(0x1498f40, 0x17d73f0)
/nix/store/w7q9g72by4dzc1z9ain17cfq1npk9ln7-go-1.9.1/share/go/src/runtime/panic.go:491 +0x283
github.com/elves/elvish/eval.catch(0xc420349710, 0xc4201cde60)
/Users/taazadi1/Personal/devel/go/src/github.com/elves/elvish/eval/frame.go:190 +0x2c9
@zzamboni
zzamboni / sliced-parallel.elv
Last active March 20, 2018 21:33
`run-parallel` with slices in Elvish
files = [ "file-"(range 100) ]
fn slice-indices [num inc]{
range $num &step=$inc | each [x]{ put $x':'(+ $x $inc) }
}
fn slices [list inc]{
put $list[(slice-indices (count $list) $inc)]
}
slices $files 5 | each [slice]{
fn last-cmd-if-enter {
lastcmd = [(edit:command-history)][-1][cmd]
if (eq $edit:current-command "") {
edit:current-command = $lastcmd
}
edit:smart-enter
}
edit:insert:binding[Enter] = $last-cmd-if-enter~
[~/Downloads]─> mkdir newrepo
[~/Downloads]─> cd newrepo/
[~/D/newrepo]─> git init
Initialized empty Git repository in /Users/taazadi1/Downloads/newrepo/.git/
[~/D/newrepo]─[⎇ master]─>
[~/D/newrepo]─[⎇ master]─> ls -l
total 0
[~/D/newrepo]─[⎇ master]─> git:status
▶ [&renamed=[] &branch-name=master &staged-deleted=[] &untracked=[] &rev-behind=0 &staged-modified=[] &ignored=[] &rev-ahead=0 &local-deleted=[] &is-git-repo=$true &copied=[] &unmerged=[] &branch-oid='(initial)' &staged-added=[] &local-modified=[]]
use re
# Verbosity configuration
debug-mode = $false
# Configuration for common domains
-default-domain-config = [
&"github.com"= [
&method= git
&protocol= https
[~/.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
aliases = [&]
fn _load_alias [name file]{
alias = [&]
-source $file
aliases[$name] = $alias[$name]
}
fn def [&verbose=false name @cmd]{
file = $dir/$name.elv
@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