Skip to content

Instantly share code, notes, and snippets.

View vboufleur's full-sized avatar
💭
Leve-se

Vitor Araujo Boufleur vboufleur

💭
Leve-se
View GitHub Profile
@z0ph
z0ph / sso_assumer.sh
Created June 3, 2022 13:46
Bash script to run an AWS CLI command across all your AWS Accounts (AWS SSO wide)
#!/bin/bash
# From Victor (zoph) Grenu from zoph.io - https://zoph.io
# Twitter: @zoph
TARGET_ROLE_NAME="AdministratorAccess"
## Get list of AWS accounts using SSO
AWS_ACCESS_TOKEN=$(cat $(ls -1d ~/.aws/sso/cache/* | grep -v botocore) | jq -r "{accessToken} | .[]")
ACCOUNTS_IDS=($(aws sso list-accounts --access-token $AWS_ACCESS_TOKEN | jq -r '.accountList[] | .accountId'))
@pil0u
pil0u / install_postman.sh
Last active May 29, 2024 18:41
Install Postman on Linux through CLI without Snap
# This script basically automates the official Postman installation guide for Linux:
# https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
# 32 or 64-bit?
BIT=$(getconf LONG_BIT)
# Download the appropriate version
wget -O ~/postman.tar.gz "https://dl.pstmn.io/download/latest/linux${BIT}"
# Extract the archive in /opt
@Bobmajor
Bobmajor / gist:319e89e9c876cccdb1b77f1783e9a820
Created April 25, 2020 16:06
HOW TO INSTALL POSTMAN ON LINUX WITHOUT SNAP
1. Go to the Postman app download page at https://www.getpostman.com/apps. You can choose the os version from the drop-down. x64 for 64 bit Operating System and x84 for the 32 bit based Linux
2. Open the terminal and go to the directory where you have downloaded the tar file. If you have downloaded on the Downloads folder
cd ~/Downloads/
3. Run the following commands,
sudo rm -rf /opt/Postman/
@mhofman
mhofman / greeter.js
Last active March 25, 2024 18:04
ES Module Dynamic export
const greeters = {
'en': 'english',
'fr': 'french'
};
const promise = (async () => {
const greeter = greeters[navigator.language.split('-')[0]];
if (!greeter) {
throw new Error('No greeter for you!');
@gmolveau
gmolveau / how_to_reverseproxy_proxypass_nginx_letsencrypt.md
Last active June 23, 2024 23:48
How to use nginx as a reverse-proxy with letsencrypt

How to use nginx as a reverse-proxy with letsencrypt

Your infrastructure

generated via plantuml

Imgur

Requirements

@rohitrawat
rohitrawat / sources.list
Created June 12, 2017 18:17
Ubuntu 16.04 Xenial default /etc/apt/sources.list
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
@estahn
estahn / metabase.service
Last active January 30, 2023 14:25
Systemd file for Metabase
[Unit]
Description=Metabase server
After=syslog.target
After=network.target
[Service]
WorkingDirectory=/home/data/tools/metabase
ExecStart=/usr/bin/java -jar /home/data/tools/metabase/metabase.jar
Environment=MB_JETTY_PORT=8080
User=data
@cryzed
cryzed / fix-infinality.md
Last active June 24, 2024 02:24
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@bendo01
bendo01 / Caddyfile
Last active November 18, 2017 01:35
Caddy Web Server As Service on Centos 7
#cd /etc/caddy/Caddyfile
example.com {
root /usr/share/nginx/html
gzip
log /var/log/caddy/access.log
#fastcgi / unix:/var/run/php-fpm/php-fpm.sock php # Fast CGI php interpreter
#fastcgi / fastcgi / 127.0.0.1:9000 php # Fast CGI php interpreter
#using with laravel
fastcgi / unix:/var/run/php-fpm/php-fpm.sock php {
index index.php
@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active June 18, 2024 20:48
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \