Skip to content

Instantly share code, notes, and snippets.

@eduaravila
eduaravila / multiple-repository-and-identities-git-configuration.md
Created September 1, 2023 02:58 — forked from bgauduch/multiple-repository-and-identities-git-configuration.md
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:
@eduaravila
eduaravila / option.go
Created August 3, 2023 06:09
option monad
package option
import (
"fmt"
"strings"
)
type Option[T comparable] struct {
Value T
}
@eduaravila
eduaravila / with.go
Last active August 6, 2023 07:11
with monad, this is a simple implementation using generics, type -> withType -> runWithLogs(withType, transform(type) withType): withType
package with
type With[T any] struct {
Value T
Logs []string
}
func RunWithLogs[T any](input With[T], transform func(T) With[T]) With[T] {
result := transform(input.Value)

singly-linked list

can be compared with a chain

A linked list is an ADT

variables

package main
import (
"bufio"
"fmt"
"math"
"os"
"strconv"
"strings"
)
# global settings
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off
# general space settings
yabai -m config layout bsp
yabai -m config bottom_padding 5
yabai -m config left_padding 5
yabai -m config right_padding 5
yabai -m config window_gap 5
@eduaravila
eduaravila / System Design.md
Created February 20, 2023 04:09 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
package chat
import (
"bufio"
"fmt"
"io"
"log"
"net"
)
@eduaravila
eduaravila / README.md
Created August 30, 2018 00:02 — forked from roachhd/README.md
EMOJI cheatsheet ๐Ÿ˜›๐Ÿ˜ณ๐Ÿ˜—๐Ÿ˜“๐Ÿ™‰๐Ÿ˜ธ๐Ÿ™ˆ๐Ÿ™Š๐Ÿ˜ฝ๐Ÿ’€๐Ÿ’ข๐Ÿ’ฅโœจ๐Ÿ’๐Ÿ‘ซ๐Ÿ‘„๐Ÿ‘ƒ๐Ÿ‘€๐Ÿ‘›๐Ÿ‘›๐Ÿ—ผ๐Ÿ”ฎ๐Ÿ”ฎ๐ŸŽ„๐ŸŽ…๐Ÿ‘ป

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. โœˆ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: ๐Ÿ˜„