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
1. open cmd | |
2. ensure your env is up | |
`docker-machine ls` | |
3. run `set DOCKERENV='your env name'` | |
4. run the following command ` echo @echo off > %TEMP%\%DOCKERENV%.bat && ( docker-machine.exe env %DOCKERENV% | sed 's/export/set/' | |
| sed 's,\\\\\\\\,\\\\,g' | sed 's,#,rem,g') >> %TEMP%\%DOCKERENV%.bat && %TEMP%\%DOCKERENV%.bat %% del | |
%TEMP%\%DOCKERENV%.bat` |
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
This is a placeholder to set the gistName |
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
# set enviroment | |
sudo chown `id -u` /etc/environment | |
cat <<EOT > /etc/environment | |
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" | |
LANG=en_US.UTF-8 | |
LANGUAGE=en_US.UTF-8 | |
LANG=en_US.UTF-8 | |
LC_ALL=en_US.UTF-8 | |
EOT |
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
""" uploads files to azure and reports to dashboard """ | |
import sys | |
import argparse | |
import os | |
from azure.storage import BlobService | |
import logging | |
LOG_LEVEL = 'WARNING' |
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
""" <replace with string description> """ | |
import json | |
import argparse | |
import sys | |
import logging | |
CONFIG = None | |
def setup(args): | |
log_level = 'WARNING' |
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
from bottle import route, request, redirect, view | |
from apiclient import discovery | |
# from apiclient import errors | |
from oauth2client import client | |
import httplib2 | |
import json | |
import os | |
CLIENT_ID = 'YOURCLIENTID.apps.googleusercontent.com' |
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
check process carbon-cache | |
matching "carbon-cache" | |
start program = "/usr/sbin/service carbon-cache restart" | |
stop program = "/usr/sbin/service carbon-cache stop" | |
if 5 restarts within 5 cycles then alert |
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
"""Azure Test SQL Module""" | |
import json | |
import argparse | |
import sys | |
import logging | |
import pymssql | |
def connect(server, database_name): | |
try: |
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
require "optparse" | |
require "CGI" | |
require 'openssl' | |
require "base64" | |
require "Faraday" | |
require 'Digest' | |
def generateToken(url,keyname,keyvalue) | |
encoded = CGI::escape(url) | |
ttl = (Time.now + 60*5).to_i |
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
VIRTUALENV=$1 | |
SCRIPT=$2 | |
PARAMS="${@:3}" | |
source $VIRTUALENV/bin/activate | |
if [ -f $(dirname $SCRIPT)/requirements.txt ] | |
then | |
pip install -r $(dirname $SCRIPT)/requirements.txt | |
fi | |
python $SCRIPT $PARAMS |