Skip to content

Instantly share code, notes, and snippets.

Surfing by the bleeding edge

Raul Gonzales gonzalesraul

Surfing by the bleeding edge
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


  • C-a == Ctrl-a
  • M-a == Alt-a


:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close

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 /
Created Nov 30, 2018
Delete pods on Kubernetes with failed status
#!/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,,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,,ns:.metadata.namespace|while read k n ns;do kubectl delete $k/$n -n $ns; done

Set up, GPG & Git to sign commits on GitHub

This is a step-by-step guide on how to create a GPG key on, 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, follow [this guide][1] instead. For manually transferring keys to different hosts, check out this [answer on Stack Overflow][2].


Keybase proof

I hereby claim:

  • I am gonzalesraul on github.
  • I am gonzalesraul ( on keybase.
  • I have a public key ASB65wSLgzABQdYI5J5_15merYHqmG1WThWoh0ektjMYIAo

To claim this, I am signing this object:

gonzalesraul /
Created Oct 1, 2018 — forked from stefansundin/
Download all of your Team's custom Slack emojis.
# get a token from
# 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
curl -q -s "$SLACK_TOKEN" | jq -Mr '.emoji | to_entries | .[] | select(.value | startswith("http")) | "\(.key) \(.value)"' | sort | while read name url; do
echo "$fn"
curl -q -s -o "$fn" "$url"
gonzalesraul /
Created Jun 4, 2018
Change default behavior for minikube CLI on `profile` command
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)"
You can’t perform that action at this time.