Skip to content

Instantly share code, notes, and snippets.

@fabiodbr
fabiodbr / gnome-credential-helper-git.md
Last active February 7, 2021 16:31 — forked from alpgarcia/github-token-for-git.md
Configure GitHub token with gnome-keyring
  1. git --version
git version 2.17.1
  1. sudo apt-get install libsecret-1-0 libsecret-1-dev
  2. cd /usr/share/doc/git/contrib/credential/libsecret
  3. sudo make
  4. git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
  5. Next time Git asked for GitHub's username an password, just write your username and paste your token and they'll be stored in your keyring.
@fabiodbr
fabiodbr / AWS IAM Policy - ForceMFA.json
Created December 2, 2020 15:44 — forked from askulkarni2/AWS IAM Policy - ForceMFA.json
AWS IAM Policy - Force MFA - This policy allows users to manage their own passwords and MFA devices but nothing else unless they authenticate with MFA
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
"iam:GetAccountPasswordPolicy",
@fabiodbr
fabiodbr / github-third-party-integration-oauth-scope-risk-impacts.md
Created November 17, 2020 20:22 — forked from gene1wood/github-third-party-integration-oauth-scope-risk-impacts.md
Analysis of the GitHub OAuth scopes granted to third party integrations and the areas of impact that they affect in the Mozilla Risk Management Model
Scope Description User repo:read User repo:write User repo:admin
(no scope) Access public information (read-only)
user Update all user data
user:email Access user email addresses (read-only)
user:follow Follow and unfollow users
public_repo Access public repositories I I
repo Full control of private repositories C CI CI
repo_deployment Access deployment status
@fabiodbr
fabiodbr / keybase.md
Created April 25, 2020 18:34
keybase.md

Keybase proof

I hereby claim:

  • I am fabiodbr on github.
  • I am fabiodbr (https://keybase.io/fabiodbr) on keybase.
  • I have a public key whose fingerprint is 9C7D A716 8051 4C01 D444 DD71 B1EC 4CB3 BAB9 C964

To claim this, I am signing this object:

@fabiodbr
fabiodbr / Makefile
Last active February 18, 2020 16:58
Self-Documented Makefile
##--------------------
## Makefile Template
## Author:Fabio Rizzi
##--------------------
.DEFAULT_GOAL := help
args = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
export LANG?=en_US.UTF-8
VARIABLE:=\
line1 \
@fabiodbr
fabiodbr / gist:cbda0227a85a51476e2715214e5f0a4e
Created February 3, 2020 17:58 — forked from hummus/gist:8592113
aws cli + jq example
wget http://stedolan.github.io/jq/download/linux64/jq
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \
"Name=instance-state-name,Values=running" \
| jq -r \
".Reservations[] | .Instances[] | .InstanceId" \
aws ec2 describe-volumes --filters \
"Name=status,Values=available" \
| jq -r ".Volumes[] | .VolumeId" \
lib_name='trap'
lib_version=20121026
stderr_log="/dev/shm/stderr-$(date +%s).log"
#
# TO BE SOURCED ONLY ONCE:
#
###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##