Skip to content

Instantly share code, notes, and snippets.

View HelioCampos's full-sized avatar

Helio Campos Mello de Andrade HelioCampos

View GitHub Profile
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
@HelioCampos
HelioCampos / GitCommitEmoji.md
Created August 22, 2020 10:06 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@HelioCampos
HelioCampos / gist:f16a50f94c92d3d9e68af73c865dc98e
Created August 22, 2020 10:04 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@HelioCampos
HelioCampos / README.md
Created August 22, 2020 10:01 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

if [ -n "$SSH_AUTH_SOCK" ] && netstat -nlpx 2> /dev/null | awk '{print $NF}' | grep -qF "$SSH_AUTH_SOCK"; then
echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" > /tmp/ssh-agent$UID
if [ -n "$SSH_AGENT_PID" ]; then
echo "export SSH_AGENT_PID=$SSH_AGENT_PID" >> /tmp/ssh-agent$UID
elif [ -n "$GNOME_KEYRING_PID" ]; then
echo "export GNOME_KEYRING_SOCKET=$GNOME_KEYRING_SOCKET" >> /tmp/ssh-agent$UID
echo "export GNOME_KEYRING_PID=$GNOME_KEYRING_PID" >> /tmp/ssh-agent$UID
fi
else
SSH_AUTH_SOCK=
@HelioCampos
HelioCampos / README.md
Created September 16, 2019 10:41 — forked from avoidik/README.md
AWS query examples

Top 10 Examples of AWS CLI Query

List Volumes showing attachment using Dictionary Notation

$ aws ec2 describe-volumes \
  --query 'Volumes[*].{ID:VolumeId,InstanceId:Attachments[0].InstanceId,AZ:AvailabilityZone,Size:Size}'
[
    {
        "InstanceId": "i-a071c394",
@HelioCampos
HelioCampos / README.md
Created September 16, 2019 10:41 — forked from avoidik/README.md
AWS query examples

Top 10 Examples of AWS CLI Query

List Volumes showing attachment using Dictionary Notation

$ aws ec2 describe-volumes \
  --query 'Volumes[*].{ID:VolumeId,InstanceId:Attachments[0].InstanceId,AZ:AvailabilityZone,Size:Size}'
[
    {
        "InstanceId": "i-a071c394",
@HelioCampos
HelioCampos / oneliner_commands.sh
Last active May 27, 2020 22:19
One liner commands
# Oneliners
## SSL
### Retrieve ssl cert from command line. Seems to be getting only one of the certs.
DNS='mydomain.com'
SERVER_NAME=$DNS # Forcing to return only the certificate for the current DNS.
PORT=443
echo | openssl s_client -showcerts -servername $SERVER_NAME -connect $DNS:$PORT 2>/dev/null | openssl x509 -inform pem -noout -text
## VIM
### Execure modifications on a file without staying on it
@HelioCampos
HelioCampos / rabbitmq2cloudwatch
Created April 26, 2019 08:21 — forked from justcompile/rabbitmq2cloudwatch
Bash script sending RabbitMQ metrics to AWS CloudWatch
#! /bin/bash
# This script reads rabbitmq statistics and report them as CloudWatch metrics.
# Author: Richard Hayes - Forked from Mirek Svoboda
# Version: 0.5
# TABSTOP=4
#
# Changelog:
# 0.5
# -- Added TotalMessages & TotalConsumers metrics
# 0.4
@HelioCampos
HelioCampos / chefquery.ps1
Created February 9, 2019 08:31 — forked from devblackops/chefquery.ps1
PowerShell script to query Chef nodes via REST API. Assumes you have the BouncyCastle.Crypto.dll in the same folder as the script.
function Get-Base64 {
param (
$data
)
# if the $data is a string then ensure it is a byte array
if ($data.GetType().Name -eq "String") {
$data = [System.Text.Encoding]::UTF8.GetBytes($data)
}