Skip to content

Instantly share code, notes, and snippets.

View karthik20522's full-sized avatar
๐Ÿ‘Š

Karthik Srinivasan karthik20522

๐Ÿ‘Š
View GitHub Profile
https://github.com/pongr/bangarang/blob/4626c37fcc53004124a7aa6dae02b41c4ade1d79/src/test/scala/s3/AmazonS3ClientAsyncEval.scala
https://github.com/felixgborrego/lib-emr-manager/blob/885cb88e70f45fa1c49343aa9f6881ce105d408d/src/main/scala/aws/S3Client.scala
https://github.com/felixgborrego/lib-emr-manager/blob/885cb88e70f45fa1c49343aa9f6881ce105d408d/src/test/scala/S3ClientSpec.scala
https://github.com/gvolpe/aws-s3-file-uploader/blob/5b12fdc036b15fd86c07dcb5518dd9a49654baae/app/aws/AWSFileService.scala
@karthik20522
karthik20522 / ES_Query_Color.json
Created May 26, 2015 19:12
ES_Query_Color.json
{
"query": {
"function_score": {
"functions": [
{
"script_score": {
"script": "_score + log10(doc['views'].value * doc['rank'].value)"
}
}
],
@karthik20522
karthik20522 / gm_node.js
Created July 24, 2015 04:19
gm_node.js
var express = require('express');
var path = require('path');
var log = require('./libs/log')(module);
var size = require('request-image-size');
var fDld = require('fast-download');
var fs = require('fs');
var app = express();
var gm = require('gm');
var uuid = require('node-uuid');
@karthik20522
karthik20522 / preview.sh
Created July 28, 2015 22:01
preview.sh
#!/bin/bash
FFMPEG=$1
INPUT_FILE=$2
OUTPUT_FILE=$3
STREAM_INDEX=$4
START_TIME=$5
DURATION=$6
if [[ -z $START_TIME || -z $DURATION ]]; then
@karthik20522
karthik20522 / logrotate.conf
Created October 13, 2015 18:35
logrotate.conf
/var/lib/docker/containers/*/*.log
{
daily
missingok
rotate 7
compress
notifempty
copytruncate
}
<html>
<head>
<style type="text/css">
body {
margin: 0;
padding: 0;
background: #EEE;
font: 10px/13px 'Lucida Sans',sans-serif;
}
.wrap {
#EXTM3U
#EXTINF:-1,US | ABC
http://cableking-iptv.com:8000/live/francesco/francesco/18463.ts
#EXTINF:-1,USA | ABC HD
http://cableking-iptv.com:8000/live/francesco/francesco/18455.ts
#EXTINF:-1,USA | A&E HD
http://cableking-iptv.com:8000/live/francesco/francesco/18458.ts
#EXTINF:-1,USA | ANIMAL PLANET
http://cableking-iptv.com:8000/live/francesco/francesco/18442.ts
#EXTINF:-1,USA | BBC WORLD NEWS
@karthik20522
karthik20522 / index.js
Last active March 23, 2017 20:30
hackathon.js
/*
npm install async
npm install request
npm install fs
npm install shuffle-array
npm install string-format
usage: node index.js fileWithMasterIds.txt
*/
@karthik20522
karthik20522 / aws_restart.sh
Last active May 24, 2019 03:41
Trivial bash Script to restart services in AWS
#!/bin/bash
set -e
function usage {
echo >&2 "Usage: $0 [ -e environment -n service_name -a action ]"
exit 1
}
while getopts ":n:e:a:" FLAG; do
case $FLAG in
@karthik20522
karthik20522 / rabbitmq.sh
Created May 24, 2019 08:18
Trivial bash script for upgrading RabbitMQ service
function check_rmq_version {
rmq_version=$(sudo rabbitmqctl status | grep "rabbit," | cut -d',' -f3 | cut -d'}' -f1 | tr -d '"')
echo && echo " Version = $rmq_version" && echo
}
function stop_rmq {
echo "Stopping RabbitMQ..."
sudo service rabbitmq-server stop
}