Skip to content

Instantly share code, notes, and snippets.

View shackra's full-sized avatar

Jorge Araya Navarro shackra

View GitHub Profile
@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active March 21, 2025 18:02
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@carlosal1015
carlosal1015 / debianlatex.md
Last active March 27, 2024 14:51
Installation of LaTeX on Debian.

Installing TeX Live for Debian users

TeX Live for Debian

Hello 😄, I'm Oromion 🇵🇪. I'm an undergraduate student of mathematics and in this video tutorial, we will show how to download and install the last version of the TeX Live Manager in order to use LaTeX for all users on your distribution of Debian.

What is LaTeX? 🚀

@carelvwyk
carelvwyk / email.go
Created February 22, 2018 12:40
Building an email in Golang to be delivered using Amazon SES
func buildEmailInput(source, destination, subject, message string,
csvFile []byte) (*ses.SendRawEmailInput, error) {
buf := new(bytes.Buffer)
writer := multipart.NewWriter(buf)
// email main header:
h := make(textproto.MIMEHeader)
h.Set("From", source)
@recoilme
recoilme / checkTelegramAuthorization.go
Created February 14, 2018 07:32
Check Telegram Authorization in golang
// check telegram authorization on golang
//php version: https://gist.github.com/anonymous/6516521b1fb3b464534fbc30ea3573c2#file-check_authorization-php
//usage:
/*
func TestTg(t *testing.T) {
data := "id=1263310&first_name=Vadim&last_name=Kulibaba&username=recoilme&photo_url=https://t.me/i/userpic/320/recoilme.jpg&auth_date=1518535618&hash=1d7069137bf517a63261ee156919a057dca93a416118eebfd0d8f5697442cdce"
token := "YOUR:TOKEN"
if !checkTelegramAuthorization(data, token) {
t.Fail()
}
@chandraratnam
chandraratnam / mutt_mbsync_multipleaccounts.md
Last active January 21, 2025 17:30
Mutt + isync mbsync + gmail + multiple accounts.

Mutt + isync multiple accounts Unfinished

This is the setup that I use for mutt, I have two google domain account (read as gmail) and an institution where I work and study account. This means I have two gmail accounts and one outlook 365 account that i want to sync and read via mutt.

I want to store all my email locally as I travel a lot and will be in countries without easy internet access. For this I use mbsync (iSync). As it can handle multiple account types easily and efficently.

The setup works this way

[Remote Mail Servers] <= mbsync => [Local Mail Folders]

@micrub
micrub / xmonad-default-key-bindings.md
Last active October 25, 2024 18:39
Xmonad default key bindings

xmonad default key bindings

Action key bindings

Key binding Action
mod - shift - slash Run xmessage with a summary of the default keybindings (useful for beginners)
mod - shift - return Launch terminal
mod - p Launch dmenu
mod - shift - p Launch gmrun
@schollz
schollz / run.sh
Created October 16, 2017 12:39 — forked from miguelmota/config.sh
IPFS change port
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/9001
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
@ricjcosme
ricjcosme / dump-restore
Created September 13, 2017 17:33
DUMP / RESTORE PostgreSQL Kubernetes
DUMP
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql
RESTORE
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
@gilbertw1
gilbertw1 / mu-index-notify.sh
Last active January 6, 2021 14:32
A simple script that re-indexes emails using mu and sends a notification if new emails are detected.
# puts timestamps into an easily comparable format
extract_timestamp() {
local RAW="$(echo "$1" | cut -c1-31)"
echo "$(date --date="$RAW" '+%Y-%m-%d:%H:%M:%S')"
}
# removes html characters that are interpreted poorly by dunst
format_string() {
echo "$1" | sed 's/>/\&gt;/' | sed 's/</\&lt;/' | sed 's/\$/\\$/'
}
@tesarwijaya
tesarwijaya / request.js
Created July 17, 2017 04:32
How to get a new token after token expired in axios
import axios from 'axios'
import store from '../store'
import qs from 'qs'
export const http = axios.create({
baseURL: 'http://localhost:8000/api/',
header: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})