Skip to content

Instantly share code, notes, and snippets.

View zzamboni's full-sized avatar
:octocat:

Diego Zamboni zzamboni

:octocat:
View GitHub Profile
use re
# Verbosity configuration
debug-mode = $false
# Configuration for common domains
-default-domain-config = [
&"github.com"= [
&method= git
&protocol= https
[~/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=[]]
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~
@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]{
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
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
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
This file has been truncated, but you can view the full file.
(list
(esup-result "esup-result" :file "/usr/local/Cellar/emacs/26.1-rc1/share/emacs/26.1/lisp/vc/vc-git.elc" :start-point 404 :line-number 15 :expression-string #("(byte-code \"\\300\\301\\302\\303\\304\\305\\306\\307&\\210\\310\\311\\312\\313\\314DD\\315\\316\\317\\304\\320&\\210\\310\\321\\312\\313\\322DD\\323\\316\\324\\304\\325&\\210\\310\\326\\312\\313\\327DD\\330\\316\\331\\304\\325&\\210\\310\\332\\312\\313\\333DD\\334\\304\\305\\316\\335&\\210\\310\\336\\312\\313\\337DD\\340\\316\\341\\304\\305&\\210\\310\\342\\312\\313\\343DD\\344\\316\\345\\304\\325&\\210\\310\\346\\312\\313\\347DD\\350\\316\\351\\304\\325&\\207\" [custom-declare-group vc-git nil \"VC Git backend.\" :version \"24.1\" :group vc custom-declare-variable vc-git-diff-switches funcall function #[0 \"\\300\\207\" [t] 1] \"String or list of strings specifying switches for Git diff under VC.\\nIf nil, use the value of `vc-diff-switches'. If t, use no switches.\" :type (choice (const :tag \"Unspecified\" nil) (const :tag \"None\"
--- === KSheet ===
---
--- Keybindings cheatsheet for current application
---
--- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/KSheet.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/KSheet.spoon.zip)
local obj={}
obj.__index = obj
-- Metadata
~> rm -rf .elvish
~> mkdir .elvish
~> cat > .elvish/rc.elv
edit:insert:binding[Tab] = { edit:completion:smart-start; edit:completion:trigger-filter }
edit:rprompt = { date +%T }
edit:-prompt-eagerness = 10
edit:rprompt-persistent = $true
use github.com/zzamboni/elvish-completions/git
~> epm:install github.com/zzamboni/elvish-completions
=> Installing github.com/zzamboni/elvish-completions