Skip to content

Instantly share code, notes, and snippets.

View dragonde's full-sized avatar
💭
Ready, Steady & Go!

dragonde

💭
Ready, Steady & Go!
View GitHub Profile
@dragonde
dragonde / copilot-casero.md
Last active July 27, 2024 17:12
copilot-casero

copilot casero

shell gpt

pip install shell-gpt

sgpt => ..

vim ~/.config/shell_gpt/.sgptrc

[legacy/profiles:/::b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
background-color='#2E3440'
bold-color='#D8DEE9'
bold-color-same-as-fg=true
cursor-background-color='rgb(216,222,233)'
cursor-colors-set=true
cursor-foreground-color='rgb(59,66,82)'
foreground-color='#D8DEE9'
highlight-background-color='rgb(136,192,208)'
highlight-colors-set=true
@dragonde
dragonde / debian-base-install.md
Last active July 30, 2024 14:37
debian-base-install

apt update & upgrade

sudo apt install vim curl htop git zsh rsync

gh client

(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) && sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y

@dragonde
dragonde / ubuntu-install.md
Last active October 22, 2024 13:57
ubuntu install

apt update && upgrade flatpak install vim curl htop

sudo snap refresh

flatpak brave vscode edge mpv spotify slack zoom

@dragonde
dragonde / conda-install.md
Last active May 2, 2024 08:56
conda-install
@dragonde
dragonde / ollama-test.py
Last active May 1, 2024 17:20
ollama test
import os
from langchain_community.llms import Ollama
llm = Ollama(model="solar")
project = 'auth-service'
directory = '/home/alber/repo/apps/' + project + '/kubernetes/chart/templates'
prompt = "given these helm templates make a values.yaml file with all the variables that appears in the templates. Output just the yaml file : \n"
@dragonde
dragonde / yq.md
Last active April 25, 2024 19:27
yq cheat sheet

curl http://plytix-charts.core.private-plytix.com:8080/api/charts -o charts.json

cat charts.json | yq e -P ' .[].[] | select(.name =="mongo*") | (.name + "," + .version)'

merges f2.yml into f1.yml (inplace)

yq eval-all --inplace 'select(fileIndex == 0) * select(fileIndex == 1)' f1.yml f2.yml

you can merge into a file, piping from STDIN

@dragonde
dragonde / palimdro.md
Last active April 25, 2024 11:59
palimdro

palimdro

abanonplytix hub.docker.com dckr_pat_Wy0hAKBYVT2JBvJyvi44EqJjt-s

@dragonde
dragonde / little-program.md
Last active April 24, 2024 17:41
little-program

hazme un pequeño programa que use rust, svelte y tailwind css ¡Vamos a crear algo emocionante!

Aquí te presento un ejemplo de aplicación simple que utiliza Rust como backend, Svelte como frontend y Tailwind CSS para estilizar la interfaz de usuario.

Backend (Rust)

use actix_web::{web, App, HttpResponse};
@dragonde
dragonde / fiz-zsh-history-corrupt.md
Last active April 22, 2024 07:31
fix zsh_history corrupt

Fix zsh history corrupt

To fix it run the following commands:

cd ~
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R .zsh_history