Skip to content

Instantly share code, notes, and snippets.

View tiagojsag's full-sized avatar

Tiago Garcia tiagojsag

View GitHub Profile
@tiagojsag
tiagojsag / lazy_pick
Last active May 23, 2024 09:18
Git lazy cherry-pick
#!/usr/bin/env bash
########################
# git lazy-pick
# Author: https://github.com/tiagojsag
#
# This command accepts 4 arguments:
# -c <commit hash>: commit hash - required
# -j <jira ticket id>: jira issue id. Used to create branch names - required
# -p: if set, will cherry-pick to prod - optional
@tiagojsag
tiagojsag / skhdrc
Last active April 2, 2024 05:43
Yabai + skhd
# restart yabai
cmd + ctrl + shift - r : yabai --restart-service
# Launch terminal
cmd - return: bash ~/bin/itermLaunch.sh
# switch yabai between stack and bsp modes
ctrl + shift - space : yabai -m space --layout "$(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "stack" else "bsp" end')"
# toggle yabai split
@tiagojsag
tiagojsag / py3status.conf
Created March 16, 2024 18:03
Py3status config file
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
@tiagojsag
tiagojsag / decorator.json
Last active January 31, 2024 15:02
WOCAT decorator JSON
[
{
"code": "technologies_4101",
"show": true,
"intervention": "luc",
"land_use_prior": ["Grassland"],
"land_use_types": ["Forest Land"],
"sub_intervention": null
},
{
@tiagojsag
tiagojsag / aio.sh
Last active March 14, 2023 13:25
All-in-one command to checkout, commit and push git changes
#!/usr/bin/env bash
########################
# GIT AIO
# Author: https://github.com/tiagojsag
#
# This command accepts two optional arguments:
# -b: if given, a ne branch is checked out. By default, it uses the current branch
# -m <message>: commit message. If not provided, you will be prompted for it
#
@tiagojsag
tiagojsag / i3exit
Created December 24, 2015 11:19
i3exit
#!/bin/sh
lock() {
i3lock
}
case "$1" in
lock)
lock
;;
logout)
@tiagojsag
tiagojsag / colori3lock.sh
Created December 24, 2015 11:18
Color i3 lock
bg=$( printf "%x%x%x\n" $(( $RANDOM % 256 )) \
$(( $RANDOM % 256 )) \
$(( $RANDOM % 256 )) )
i3lock -c $bg
@tiagojsag
tiagojsag / i3status.conf
Last active June 14, 2018 13:05
i3status config (Desktop)
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
@tiagojsag
tiagojsag / .i3 config
Last active March 16, 2024 18:01
My i3 config file
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font xft:inconsolata, Icons 12
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal