Skip to content

Instantly share code, notes, and snippets.

View frouo's full-sized avatar
🇫🇷

François Rouault frouo

🇫🇷
View GitHub Profile

Option 1

Assuming you have Xcode installed:

# ensure you have pip installed
python3 -m pip --version

# install diff-highlight
python3 -m pip install diff-highlight
@frouo
frouo / .tigrc
Last active May 12, 2022 10:54
bind generic 9 !@sh -c "printf '%s' $(git rev-parse --short %(commit)) | pbcopy"
bind status + ?@git commit --amend --no-edit
bind main D ?@git branch -D %(branch)
bind main P ?@git pull origin %(branch) --rebase
bind main > ?@git reset --hard %(commit)
bind main F ?git fetch --prune
bind main c @sh -c "git branch --points-at=%(commit) | \
sed -n '/^\*/ {n;p;}' | \
@frouo
frouo / .gitconfig
Last active March 21, 2024 10:44
.gitconfig
[user]
name = François Rouault
email = [email protected]
[init]
defaultBranch = main
[alias]
lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'
amend = commit --amend --no-edit
ri = rebase -i
st = status
@frouo
frouo / Decodable.swift
Last active June 3, 2021 13:21
Decoding JSON array **not** containing the same objects (Swift + Decodable)
let jsonString = """
{
"items": [
{
"id": 20,
"type": "juice",
"fruit": "orange"
},
{
"id": 99,