Skip to content

Instantly share code, notes, and snippets.

View amitizle's full-sized avatar
:octocat:
🦄🦄🦄

Amit Goldberg amitizle

:octocat:
🦄🦄🦄
View GitHub Profile
@amitizle
amitizle / main.go
Created November 10, 2019 15:47
Golang AMQP: Wait for rabbitmq to accept connections using
package main
import (
"fmt"
"log"
"net"
"time"
"github.com/streadway/amqp"
)
@amitizle
amitizle / install_curl.sh
Created June 4, 2019 11:12
Install a newer curl version from Github releases
#!/usr/bin/env bash
set -e
# Ubuntu 16.04's curl is very ultra amzingly old. That's why.
LOGGER_RED='\033[0;31m'
LOGGER_GREEN='\033[0;32m'
LOGGER_YELLOW='\033[0;33m'
LOGGER_NC='\033[0m' # No Color
@amitizle
amitizle / keybase.md
Created June 9, 2017 09:20
Keybase proof

Keybase proof

I hereby claim:

  • I am amitizle on github.
  • I am amitas (https://keybase.io/amitas) on keybase.
  • I have a public key whose fingerprint is 3260 E533 E2D9 13D1 4B2D F3FF 602D DF91 50D0 3C46

To claim this, I am signing this object:

@amitizle
amitizle / Install luasec MacOS
Created May 22, 2017 18:41
Install luasec rock MacOS
# With openssl installed (brew install openssl)
$ luarocks --local install luasec OPENSSL_INCDIR=/usr/local/opt/openssl/include/
@amitizle
amitizle / osx_say_random_en_voice.sh
Created April 16, 2016 20:38
Use OSX's `say` command with random en voice
#!/bin/bash
function sayr {
say -v? | grep en_ | cut -d" " -f 1 | gshuf | head -1 | xargs say "$@" -v
}
sayr "$@"
@amitizle
amitizle / print_title.sh
Created September 27, 2015 22:00
Print title in bash
#!/usr/bin/env bash
# Usage: print_title word1 word2 .. wordn
title=${*:1}
title_size=${#title}
output_line_size=$(echo "$title_size + 4" | bc -l)
eval printf '=%.0s' {1..$output_line_size}
printf "\n"
printf "= $title ="
printf "\n"