Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
@diegopacheco
diegopacheco / haskell.md
Last active March 4, 2024 08:51
Having fun with Haskell

Tiny Haskell Essay

created: 01.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Haskell

  • Created in 1990 (30+ years)
  • Designed by many people
@diegopacheco
diegopacheco / xml-extract-sed-linux-bash.md
Created January 12, 2024 23:05
Extract XML from sed
 sed -n 's,.*<GetCompensableProductIdentification>\(.*\)</GetCompensableProductIdentification>.*,\1,p' input
@diegopacheco
diegopacheco / fix-docker-compose-issue-cgroups-unknown.md
Created January 12, 2024 22:04
docker-compose: cgroups: cannot found cgroup mount destination: unknown

problem:

cgroups: cannot found cgroup mount destination: unknown

fix:

sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
@diegopacheco
diegopacheco / .vimrc
Last active January 20, 2024 21:57
.vimrc configs and plugins
set nocompatible " be iMproved, required
filetype off " required
"
" Vim spesific editor configs
"
set encoding=utf-8
set number " Show line numbers
set backspace=indent,eol,start " fix backspace
set mouse=a " fix mouse to it only scroll inside vim not outside
@diegopacheco
diegopacheco / nvm-prefix-issue.md
Created January 5, 2024 21:38
nvm is not compatible with the npm config "prefix" option:

Error:

nvm is not compatible with the npm config "prefix" option:

Fix: add this 2 lines in your profile. vim ~/.zshrc

npm config delete prefix
npm config set prefix $NVM_DIR/versions/node/v21.5.0
@diegopacheco
diegopacheco / YouCompleteMe-install-space-vim.md
Last active January 5, 2024 10:16
Install YouCompleteMe on SpaceVim for vim

Install SpaceVim

curl -sLf https://spacevim.org/install.sh | bash

Install YouCompleteMe

cd $HOME/.vim/plugged
git clone https://github.com/ycm-core/YouCompleteMe.git
sudo apt install build-essential cmake vim-nox python3-dev
python3 install.py --all
@diegopacheco
diegopacheco / pocs-2023
Created December 31, 2023 19:05
POCs 2023
❯ pocs-count.sh
Java : 605
Scala : 119
Rust : 186
Go : 106
C : 18
C++ : 55
Kotlin : 50
Clojure : 82
Haskell : 21
@diegopacheco
diegopacheco / space-vim-dont-work-or-not-open.md
Created December 28, 2023 09:16
SpaceVim Stop working or does not open?

FIX

~/.SpaceVim
git checkout v2.2.0

You can look your vim/nvim compatible version here: https://spacevim.org/
I had issues with spacevim 2.3.0-dev so I had to force v2.2.0
IF you want to know your vim version do:

❯ vim --version
@diegopacheco
diegopacheco / spacevim-vim9.md
Created December 28, 2023 09:01
SpaceVim for Vim 9
@diegopacheco
diegopacheco / .tmux.conf
Last active January 20, 2024 21:56
tmux conf
unbind r
bind r source-file ~/.tmux.conf
#
# List of plugins
#
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'dracula/tmux'