Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
@diegopacheco
diegopacheco / pbpaste-pbcopy-ubuntu.md
Last active May 8, 2024 15:11
pbpaste && pbcopy for Ubuntu Linux 20.04

Install

sudo apt-get install xclip -y

Create Alias

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

Try out

@diegopacheco
diegopacheco / docker-remote-connection-mysql-linux.md
Last active April 29, 2024 13:48
Remote Connection to MySQL Running on Docker from Linux HOST?

On Linux

sudo mkdir -p /usr/local/docker/mysql
sudo chmod 777 -R  /usr/local/docker/mysql
docker run -p 3306:3306 -v /usr/local/docker/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -d mysql/mysql-server:latest
docker ps
docker exec -it $CONTAINER_ID bash

On Docker container (Just do it once)

@diegopacheco
diegopacheco / cuda-ubuntu-22.md
Created April 20, 2024 23:14
install cuda ubuntu 22
sudo apt install cuda-11-8 -y
@diegopacheco
diegopacheco / cudnn-ubuntu-22.04.md
Last active April 6, 2024 08:28
Install Nvidia: cudnn on ubuntu 22.04
wget https://developer.download.nvidia.com/compute/cudnn/9.0.0/local_installers/cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb
sudo dpkg -i cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2204-9.0.0/cudnn-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cudnn

sudo apt-get -y install cudnn-cuda-11
sudo apt-get -y install cudnn-cuda-12

@diegopacheco
diegopacheco / pyaudio-ubuntu-install.md
Last active March 28, 2024 21:33
How to Install pyaudio ubuntu 16.04 LTS?
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
sudo apt-get install ffmpeg libav-tools
sudo pip install pyaudio
@diegopacheco
diegopacheco / deploy-rpm-nexus.sh
Last active March 19, 2024 11:13
deploy-rpm-nexus.sh
#!/bin/bash
### Method 1
###
mvn deploy:deploy-file \
-DgroupId=com.github.diegopacheco.sandbox.devops \
-DartifactId=fpmtest \
-Dversion=1.0.0 \
-DgeneratePom=true \
-Dpackaging=rpm \
@diegopacheco
diegopacheco / bazel-ubuntu-20.04.md
Created December 4, 2020 17:41
Installing Google Bazel on Ubuntu 20.04 LTS
sudo apt install curl gnupg
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list

sudo apt update && sudo apt install bazel
sudo apt update && sudo apt full-upgrade
bazel --version
@diegopacheco
diegopacheco / zsh-export-functions-linux.md
Created July 10, 2017 18:54
How to export function in ZSH?
touch ~/.zsh_functions
vim ~/.zsh_functions
function jcurl() {
  curl -s "$@" | json | pygmentize -l json
}

function tojson(){
@diegopacheco
diegopacheco / having-fun-with-typescript.md
Last active March 4, 2024 17:11
Having fun with Typescript

Tiny Typescript Essay

created: 20.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 Typescript

  • Created in 2012 by Microsoft
  • Type System