#How to work on someone else's branch
Let's assume you need to collaborate with Batman on his forked repository.
- Add fork as a remote
git remote add batman git@github.com:batman/iambatman.git
- Fetch remote
export CLIENT_ID="" | |
export CLIENT_SECRET="" | |
export OAUTH_TOKEN_ENDPOINT="" | |
export MCP_SERVER_ENDPOINT="" |
#How to work on someone else's branch
Let's assume you need to collaborate with Batman on his forked repository.
git remote add batman git@github.com:batman/iambatman.git
[package] | |
name = "test" | |
version = "0.1.0" | |
edition = "2021" | |
publish = false | |
[dependencies] | |
shuttle-runtime = "0.53.0" | |
tokio = "1" |
To enable signing commits using an ssh key:
git config --global user.signingkey "your ssh public key"
git config --global gpg.format ssh
git config --global gpg.sshprogram /Applications/1Password.app/Contents/MacOS/op-ssh-sign
git config --global commit.gpgsign true
To have git log
show signature checks:
git config --global log.showSignature true
git config --global gpg.ssh.allowedSignersFile $HOME/.gitallowed_signers
$HOME/.gitallowed_signers
and put in a line such as this (with a name and the public key): name ssh-ed25519 WEPOFJEWOI123/asdQW
package main | |
import ( | |
"fmt" | |
"strings" | |
"sync" | |
"time" | |
) | |
// var frames = []string{"⠁", "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋ ", "⠉", "⠈", "⠈"} |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"html/template" | |
"os" | |
"gopkg.in/mail.v2" | |
) |
ssh-add
)git config --global user signingkey "‹your ssh public key›"
git config --global gpg. format ssh
git config --global gpg.ssh.program /Applications/1Password.app/Contents/MacOS/op-ssh-sign
git config --global commit.gpgsign true
git config --global log. showSignature true
git config --global gpg.ssh.allowedSignersFile $HOME/.gitallowed_signers
Create example project:
cargo new googlegemini && cd googlegemini
Copy the code of the main.rs
file and add dependencies in cargo.toml
file:
[dependencies]
reqwest = { version = "0.12", features = ["json"] }
tokio = { version = "1", features = ["full"] }
// Multithreaded Server with error handling | |
// https://doc.rust-lang.org/book/ch21-02-multithreaded.html | |
use std::{ | |
fmt, | |
io::{BufReader, prelude::*}, | |
net::{TcpListener, TcpStream}, | |
sync::{Arc, Mutex, mpsc}, | |
thread, | |
}; |
// https://zig.news/toxi/typepointer-cheatsheet-3ne2 | |
// | |
// Examples on how to create/init every type that is part of the type/pointers cheatsheet. | |
const std = @import("std"); | |
const print = std.debug.print; | |
/// Cheatsheet stores a list of all types and pointers. | |
const Cheatsheet = struct { | |
/// single u8 value | |
a: u8, |