Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
@diegopacheco
diegopacheco / virtual-threads-summary.md
Last active February 9, 2024 00:07
Java 21 - Virtual Threads Summary

Summary JVM Threads vs Vritual Threads

Threads

  • Threads are wrapper around OS Threads
  • Have a cost and consume memory
  • Can't have many, need a thread pool
  • Good for CPU Bound, not good for IO Bound.
  • 2k metadata, 1MB stack, 1-10us context switch
@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 / 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 / .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'
@diegopacheco
diegopacheco / junit5-maven3-surefire-tests-terminal.md
Last active January 13, 2022 03:30
Maven 3, Junit 5, Surefire: Make sure maven get and run the tests in terminal

pom.xml

<build>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <version>3.0.0-M5</version>
              <dependencies>
              </dependencies>
@diegopacheco
diegopacheco / mount-external-HD-ubuntu-linux.md
Last active April 12, 2021 02:40
Can't mount external HD in Linux?
# figure out where the HD is 
sudo fdisk -l 
# mount it - for me was /dev/sdc so had to add 1 
sudo mount /dev/sdc1 /mnt
# to un mount
sudo umount /dev/sdc1
@diegopacheco
diegopacheco / s3-cheat-sheet-commands.md
Created March 9, 2021 20:17
S3 Cheat Sheet Commands

S3 Commands

## List files
aws ls cp s3://mybucket/

## print file content
aws s3 cp s3://mybucket/stream.txt -
@diegopacheco
diegopacheco / git-rebase-squash.md
Last active March 9, 2021 20:17
Git Rebase & Squash

Figure out the commit range

git log

Squash and edit commit message

###
### Commit RANGE from Older to Newer
### OLDER commit NEW COMMIT 
@diegopacheco
diegopacheco / tcpdump.md
Created February 25, 2021 16:54
TCP Dump
sudo tcpdump -i lo -A -s 0 tcp port 9000 -w server.pcap