Skip to content

Instantly share code, notes, and snippets.

@sgmac
sgmac / multiple_ssh_setting.md
Created August 6, 2025 07:46 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@sgmac
sgmac / gist:47c21ef29c551d2b618ae2d27375b82d
Created July 10, 2025 16:56 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@sgmac
sgmac / latency.txt
Created May 12, 2025 05:04 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
# Source: https://gist.github.com/808108069f709572f1bc372c65f6b5c0
###########
# Prepare #
###########
# Option 1:
# Create a Kubernetes cluster
# Install NGINX Ingress
# Install Argo CD
# Source: https://gist.github.com/84324e2d6eb1e62e3569846a741cedea
####################
# Create a Cluster #
####################
minikube start
#############################
# Deploy Ingress Controller #
@sgmac
sgmac / feed.go
Created May 1, 2018 21:05
Managing opml feeds
package main
import (
"encoding/xml"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
package main
import (
"context"
"fmt"
"os"
"os/signal"
"sync"
"syscall"
"time"
# Based on http://fearby.com/article/update-openssl-on-a-digital-ocean-vm/
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ wget ftp://ftp.openssl.org/source/openssl-1.0.2j.tar.gz # Check the last version
$ tar -xvzf openssl-1.0.2h.tar.gz
$ cd openssl-1.0.2h
$ ./config --prefix=/usr/
$ make depend
// Crear un programa que declare dos funciones anónimas. Una que cuente del 0 al 200 y otra que cuente de 200 a 0.
// Mostrar cada número con un identificador único para cada goroutine.
// Crear goroutines a partir de estas funciones.
// No permitir que main regrese hasta que ambas goroutines hayan terminado de correr.
// https://play.golang.org/p/wjhbcgFg-g
package main
// Agregar imports.