Skip to content

Instantly share code, notes, and snippets.

View tiagoapimenta's full-sized avatar

Tiago Augusto Pimenta tiagoapimenta

View GitHub Profile
@tiagoapimenta
tiagoapimenta / enlightenment-setup.sh
Created May 14, 2023 10:18
Lightweight Ubuntu alternatives
#!/bin/sh
# wget -qO- ... | sudo sh -s
set -e
if [ "$(id -u)" != 0 ]; then
exec sudo -- "$0" "$@"
exit 1
fi
@tiagoapimenta
tiagoapimenta / sguard.sh
Last active July 20, 2022 17:53
Steam Guard Token Generator
#!/bin/sh
set -e
# To get the Secret value follow this:
# https://github.com/steamguard-totp/steamguard-shared-secret
# Don't forget to unescape '/' if there is
file="$(dirname "$(readlink -f "$0")")/steam.secret"
git config --global user.email 'EMAIL'
git config --global user.name 'NOME'
git config --global pull.ff only
git config --global merge.conflictstyle diff3
git config --global apply.whitespace nowarn
git config --global apply.ignorewhitespace true
git config --global gui.encoding utf-8
git config --global core.mergeoptions '-Xignore-space-change -Xrenormalize -Xdiff-algorithm=minimal'
git config --global core.quotepath false
git config --global color.ui true
@tiagoapimenta
tiagoapimenta / alertmanager-sort-feat.path
Last active April 20, 2018 16:09
This patch should be applyed on 0.14.0 tag version
diff -rupN a/config/config.go b/config/config.go
--- a/config/config.go 2018-02-13 06:13:44.000000000 -0200
+++ b/config/config.go 2018-04-20 13:07:29.802965461 -0300
@@ -382,6 +382,7 @@ func (c *GlobalConfig) UnmarshalYAML(unm
type Route struct {
Receiver string `yaml:"receiver,omitempty" json:"receiver,omitempty"`
GroupBy []model.LabelName `yaml:"group_by,omitempty" json:"group_by,omitempty"`
+ SortBy []model.LabelName `yaml:"sort_by,omitempty" json:"sort_by,omitempty"`
Match map[string]string `yaml:"match,omitempty" json:"match,omitempty"`