Skip to content

Instantly share code, notes, and snippets.

View sl-victorceron's full-sized avatar

Victor Ceron sl-victorceron

View GitHub Profile
@cauealvesbraz
cauealvesbraz / aws-iam-get-username-by-access-key.bash
Created January 5, 2019 18:10
AWS IAM Get UserName by Access Key Id
#!/bin/bash
# exit when the command fails
set -o errexit;
# exit when try to use undeclared var
set -o nounset;
accessKeyToSearch=${1?"Usage: bash $0 AccessKeyId"}
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 23, 2024 02:24
Conventional Commits Cheatsheet

Conventional Commit Messages

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

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@dennisobrien
dennisobrien / Markdown.JavaScript.md.js
Created October 1, 2017 04:52
DataGrip extension to export results to markdown.
/*
* DataGrip extension to export results to markdown.
* The markdown table format is supported by Github and Jira. I haven't tested others.
*
* Tested on DataGrip 2016.2.2
* - Open the File view. View -> Tool Windows -> Files
* - Activate the "Scratches" tab. You should see "Files", "Scopes", and "Scratches".
* - Copy this file to Extensions/Database Tools and SQL/data/extractors/Markdown.JavaScript.md.js
* - Run a query with some results.
* - Change the export format to Markdown.JavaScript.md.js and click "To Clipboard".
@brianredbeard
brianredbeard / get_token.md
Last active October 3, 2022 02:18
aws, sts, and bash

About

AWS provides a mechanism for temporarily assuming another role within their API system. While it is not a technically hard process it can be convoluted and hard to understand. This document aims to both make it easier to follow along with as well as give an in depth explanation of some of the underpinnings of the Bourne Again Shell (aka BASH) which can make this easier to utilize on a day to day basis.

Explanation

Below is an overexplained version of the following process:

  1. Using credentials stored in ~/.aws/credentials as a "profile" which are then understood by the AWS command line tools
  2. Using those AWS credentials, temporarily assume a role using the AWS Security Token Service (STS) to get temporary
@jimschubert
jimschubert / Markdown-JavaScript.markdown.js
Last active September 24, 2023 13:31
DataGrip (IntelliJ) output SQL results to Markdown
if (!String.prototype.repeat) {
// polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
String.prototype.repeat = function(count) {
'use strict';
if (this == null) {
throw new TypeError('can\'t convert ' + this + ' to object');
}
var str = '' + this;
count = +count;
if (count != count) {
@yannickcr
yannickcr / paris-nodejs-npm.md
Created November 20, 2014 23:19
Gestion des dépendances avec npm

Gestion des dépendances avec npm

Node.js Paris, 20 Novembre 2014


Les différents types de dépendances

Project
@clintongormley
clintongormley / emoticon list
Created April 18, 2014 09:38
Emoticon analyzer
e_smiley :-) :) :o) :] :3 :c) :> =] 8) =) :} :^) :っ) :-)) :-))) :-)))) :)) :))) :))))
e_laugh :-D :D 8-D 8D x-D xD X-D XD =-D =D =-3 =3 B^D
e_sad >:[ :-( :( :-c :c :-< :っC :< :-[ :[ :{
e_wink_frown ;(
e_angry :-|| :@ >:(
e_cry :'-( :'(
e_happy_tears :'-) :')
e_disgust D:< D: D8 D; D= DX v.v D-':
e_surprise >:O :-O :O :-o :o 8-0 O_O o-o O_o o_O o_o O-O
e_kiss :* :^* '}{'
@IanVaughan
IanVaughan / uninstall_gems.sh
Created June 9, 2012 20:37
Uninstall all rbenv gems
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}