Get EC2 CloudWatch stats and graph them in Dashing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Standard library imports. | |
from SocketServer import ThreadingMixIn | |
import BaseHTTPServer | |
import SimpleHTTPServer | |
import sys | |
import json | |
import os | |
from os.path import (join, exists, dirname, abspath, isabs, sep, walk, splitext, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
VERSION="0.4.0" | |
COMMAND=$1 | |
CWD=$(pwd); | |
case "$COMMAND" in | |
"set") |
#Setting up nagios plugin for ami check
- copy check_ami.py to your nagios plugin directory
- give executable permission check_ami.py
- copy config file in you nagios plugin directory add your id and key
- change command file and add new command
define command{
command_name check_ami
command_line $USER1$/check_ami.py $ARG1$ $ARG2$ "$ARG3$"
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from fabric.api import * | |
def uptime(): | |
local('uptime') | |
def remote_add(): | |
local('git init') | |
local('git remote add origin https://github.com/vikas17a/testfab.git') | |
local('git pull origin master') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RESULT=$(google-authenticator <<! | |
y | |
y | |
y | |
n | |
y | |
! | |
) | |
echo $RESULT | awk '{print "QR Code URL:\n"$10}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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): |
- Set up and start redis server
- Enter following command in clone
git clone https://github.com/seejohnrun/haste-server.git && cd haste-server/
cat config.js #setup configuration of hastebin server port and redis server port
npm install
npm start &> /dev/null/ &
User this server IP and Port in following steps to setup command line code paste to haste-server
NewerOlder