Skip to content

Instantly share code, notes, and snippets.

View kartiksura's full-sized avatar

Kartik Sura kartiksura

  • @adap.tv
  • Palo Alto
View GitHub Profile
@kartiksura
kartiksura / main.go
Last active June 7, 2023 16:38
Querying AWS Athena using Golang SDK
package main
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/athena"
)
@kartiksura
kartiksura / killf.sh
Created May 12, 2016 18:20
Automatically kill a process if it exceeds a given amount of RAM
I would strongly advise not to do it. As suggested by @chrisamiller , setting ulimit will limit the RAM available with process.
But still if you are insisting then follow this procedure.
Save the following script as killif.sh:
#!/bin/sh
if [ $# -ne 2 ];
then echo "Invalid number of arguments"
exit 0