Skip to content

Instantly share code, notes, and snippets.

View viebig's full-sized avatar

Guilherme Viebig viebig

View GitHub Profile
#!/bin/bash
args=("$@")
token=${args[0]}
number=${args[1]}
message=${args[2]}
numbers=(${number//,/ })
for i in "${!numbers[@]}"
@viebig
viebig / reflect.py
Created March 16, 2016 20:08 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@viebig
viebig / ec2hostname.rb
Created January 27, 2016 12:03 — forked from kixorz/ec2hostname.rb
EC2 Instance Route53 Hostname registration init.d script. Instance needs to have the attached IAM instance role policy applied.
#!/usr/bin/ruby
# chkconfig: 35 99 01
# description: EC2 DNS registration
# processname: ec2hostname
require 'aws-sdk'
require 'net/http'
`touch /var/lock/subsys/ec2hostname`