Skip to content

Instantly share code, notes, and snippets.

Raul Gonzales gonzalesraul

Block or report user

Report or block gonzalesraul

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bash-cheatsheet.md

Bash Cheatsheet

Editing Shortcuts

Input Description
Ctrl + a go to the start of the command line
Ctrl + e go to the end of the command line
Ctrl + k delete from cursor to the end of the command line
Ctrl + u delete from cursor to the start of the command line
View installation-demo.json
{
"name": "installation",
"version": "v0.0.1",
"compliant": true,
"controlParameters": [
{ "name": "caminho", "value": "/tmp/envvars" },
{ "name": "deployerParameterPrefix", "value": "export" }
],
"deployerParameters": [
{ "name": "FROM_ROOT", "value": "true" },
View parametrizador-phases.json
{
"name": "parametrizador-phases",
"version": "v0.0.1",
"install": [
{
"name": "Carrega variaveis",
"command": "{{DEPLOYER_PARAMETERS}}; printenv > {{caminho}}-{{nome}}"
},
{
"name": "imprime variaveis",
View verifica-phases.json
{
"name": "verifica-phases",
"version": "v0.0.1",
"install": [
{
"name": "Verifica sistema",
"command": "uname -a"
},
{
"name": "Lista tamanho dos ficheiros",
@gonzalesraul
gonzalesraul / delete-pods-by-status.sh
Created Nov 30, 2018
Delete pods on Kubernetes with failed status
View delete-pods-by-status.sh
#!/usr/bin/env sh
#Delete in all namespaces (Evicted pods)
kubectl get po --field-selector=status.phase==Failed --all-namespaces --no-headers -o=custom-columns=k:kind,n:.metadata.name,ns:.metadata.namespace|while read k n ns;do kubectl delete $k/$n -n $ns; done
#Delete specific namespace
kubectl get po --field-selector=status.phase==Failed -n ${NAMESPACE} --no-headers -o=custom-columns=k:kind,n:.metadata.name,ns:.metadata.namespace|while read k n ns;do kubectl delete $k/$n -n $ns; done
View keybase-gpg-github.md

Set up Keybase.io, GPG & Git to sign commits on GitHub

This is a step-by-step guide on how to create a GPG key on keybase.io, adding it to a local GPG setup and use it with Git and GitHub.

Although this guide was written for macOS, most commands should work in other operating systems as well.

There's a video published by Timothy Miller explaining some parts of this guide. Discussion on Hacker News.

Note: If you don't want to use Keybase.io, follow [this guide][1] instead. For manually transferring keys to different hosts, check out this [answer on Stack Overflow][2].

View keybase.md

Keybase proof

I hereby claim:

  • I am gonzalesraul on github.
  • I am gonzalesraul (https://keybase.io/gonzalesraul) on keybase.
  • I have a public key ASB65wSLgzABQdYI5J5_15merYHqmG1WThWoh0ektjMYIAo

To claim this, I am signing this object:

@gonzalesraul
gonzalesraul / download-slack-emoji.sh
Created Oct 1, 2018 — forked from stefansundin/download-slack-emoji.sh
Download all of your Team's custom Slack emojis.
View download-slack-emoji.sh
#!/bin/bash
# get a token from https://api.slack.com/custom-integrations/legacy-tokens
# or if you don't have permissions to create one, you can inspect the Slack web client and you can get the one it is using
SLACK_TOKEN=
curl -q -s "https://slack.com/api/emoji.list?token=$SLACK_TOKEN" | jq -Mr '.emoji | to_entries | .[] | select(.value | startswith("http")) | "\(.key) \(.value)"' | sort | while read name url; do
fn="$name.${url##*.}"
echo "$fn"
curl -q -s -o "$fn" "$url"
done
@gonzalesraul
gonzalesraul / minikube_profile.sh
Created Jun 4, 2018
Change default behavior for minikube CLI on `profile` command
View minikube_profile.sh
function minikube() {
if [[ $1 == "profile" ]]; then
case $2 in
list )
current=`grep -oP '(?<="profile": ")[^"]*' $HOME/.minikube/config/config.json`
profiles=`ls -1 $HOME/.minikube/profiles`
echo -n "* $current"
if [[ '' == `echo $profiles|grep $current` ]]; then
echo -n " (not created)"
fi
@gonzalesraul
gonzalesraul / introrx.md
Created Jun 1, 2018 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
You can’t perform that action at this time.