Skip to content

Instantly share code, notes, and snippets.

@chespinoza
chespinoza / cond-example.clj
Created April 21, 2019 13:54 — forked from Engelberg/cond-example.clj
refactoring with better-cond
; The sample to refactor
(if-let [x (foo)]
(if-let [y (bar x)]
(if-let [z (goo x y)]
(do
(qux x y z)
(log "it worked")
true)
(do
(log "goo failed")
@chespinoza
chespinoza / mainpython.md
Created May 6, 2019 20:05 — forked from rochacbruno/mainpython.md
Use of __main__.py

The use of __main__.py to create executables

myprojectfolder/
    |_ __main__.py
    |_ __init__.py

Being __main__.py:

print("Hello")

@chespinoza
chespinoza / dotnetlayout.md
Created June 25, 2019 00:09 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@chespinoza
chespinoza / i3-shortcuts-screenshot.md
Created November 10, 2021 18:14 — forked from dianjuar/i3-shortcuts-screenshot.md
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots