Skip to content

Instantly share code, notes, and snippets.

View danilogco's full-sized avatar

Danilo Carolino danilogco

  • QFlash
  • Rio Claro-SP, Brasil
  • 21:21 (UTC -03:00)
View GitHub Profile
@danilogco
danilogco / install.sh
Created April 26, 2021 02:21
TP-Link Archer T4U v3 - Ubuntu 21.04
#!/bin/bash
# tested 5.11.0-16-generic #17-Ubuntu SMP Wed Apr 14 20:12:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
# installing dkms and git
sudo apt update
sudo apt install -y dkms git
# cloning driver repository
mkdir ~/src
cd ~/src
@danilogco
danilogco / clean_snaps.sh
Created April 26, 2021 02:36
Clean old snap packages
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=C snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
git config -e --global
[alias]
cleanup = "!git fetch -f && git branch | grep -v "dev" | grep -v "master" | xargs --no-run-if-empty git branch -D && git gc"

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

docker container prune -f
docker volume prune -f
docker image prune -a -f
docker network prune -f
docker system prune -f
gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true
@danilogco
danilogco / change_heroku_redis_version.sh
Created May 27, 2021 02:25
Changing Heroku Redis version
heroku addons:create heroku-redis:hobby-dev --version 6 -a app_name
heroku redis:promote redis-curved-54192 --app app_name
@danilogco
danilogco / gist:36f402419b77fe8a8a47207fae4bb909
Created October 14, 2021 17:16
bootable pendrive Ubuntu 21.10
sudo dd if=ubuntu-21.10-desktop-amd64.iso of=/dev/sdc bs=4M; sync
@danilogco
danilogco / gist:f33ff93d78ae99ee70e9a5bedd87afc9
Created October 15, 2021 18:03
retrieve ubuntu ppa list
grep -r --include '*.list' '^deb ' /etc/apt/sources.list /etc/apt/sources.list.d/
@danilogco
danilogco / gist:ef575fcac471ba078d6fb638a04fa459
Created October 27, 2021 17:43
rotate postgres password - heroku
#!/usr/bin/env ruby
heroku pg:credentials:rotate DATABASE --name analyst -a example-app