Skip to content

Instantly share code, notes, and snippets.

View ikrauchanka's full-sized avatar
🏠
Working from home

ilja K. ikrauchanka

🏠
Working from home
View GitHub Profile
@ikrauchanka
ikrauchanka / ec2_events.go
Last active August 17, 2016 08:16
golang show scedulled events for EC2 instances
// thanks to https://github.com/rhartkopf/check_ec2_events/blob/master/check_ec2_events.go
// This program will query Amazon API
// and show scedulled events for EC2 instances
// When you have a slack, you would like to see messages in the room:
// 0 6 * * * root /usr/local/bin/instances_event | /usr/local/bin/slacktee.sh --title "upcoming instances events" > /dev/null
package main
import (
"fmt"
@ikrauchanka
ikrauchanka / gist:ddc076308f1297e5a5e8c969a4df1c8e
Created May 29, 2016 18:38
golang return function in function
package main
import (
"fmt"
)
func makeFunction(name string) func() {
return func() {
fmt.Printf("Hello %s", name)
}
location / {
content_by_lua 'os.execute("/var/www/cgi-bin/script.sh")';
}