Skip to content

Instantly share code, notes, and snippets.

View dtelaroli's full-sized avatar

Denilson Telaroli dtelaroli

View GitHub Profile
@dtelaroli
dtelaroli / wait_for_http_200.sh
Last active January 11, 2019 14:00 — forked from rgl/wait_for_http_200.sh
Wait for an HTTP endpoint to return 200 OK with Bash and curl
#!/bin/bash
# Usage
# $ chmod +x ./wait_for_http_200.sh
# $ sh wait_for_http_200.sh http://<host>:<port>/<path>
echo "Trying to reach ${1}"
i=0
while [[ "$(curl -s -o /dev/null -w '%{http_code}' ${1})" != "200" ]]; do
sleep 5
@dtelaroli
dtelaroli / helper.rb
Last active January 4, 2016 06:29 — forked from m3nd3s/helper.rb
#encoding: utf-8
module T3L4R0L1
def me_ajuda?(dinheiro)
if dinheiro > 500
"SIM"
else
"NÃO"
end
end
end