Skip to content

Instantly share code, notes, and snippets.

@chespinoza
chespinoza / .spacemacs
Created September 7, 2019 16:37
Spacemacs config
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@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/
@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 / 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 / read-csv-file.clj
Created April 18, 2019 07:57
Reading CSV files
(with-open [rdr (reader "my/file.csv")]
(->> rdr
(line-seq)
(map #(split % #","))))
cat << EOF >> Pipfile
[scripts]
echospam = "echo I am really a very silly example"
EOF
pipenv run echospam
>> I am really a very silly example
@chespinoza
chespinoza / ADR.md
Created May 21, 2018 17:19
Architecture Decision Record

[short title of solved problem and solution]

  • Status: [accepted | superseeded by ADR-0005 | deprecated | …]
  • Deciders: [list everyone involved in the decision]
  • Date: [YYYY-MM-DD when the decision was last updated]

Technical Story: [description | ticket/issue URL]

Context and Problem Statement

@chespinoza
chespinoza / docker-cleanup-resources.md
Created May 18, 2018 08:36 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

eval $(ssh-agent) > /dev/null
@chespinoza
chespinoza / multiple_ssh_setting.md
Last active May 11, 2018 00:22 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

restart ssh-agent

killall ssh-agent; eval `ssh-agent`

create different public key