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
import datetime | |
import os | |
import string | |
import tarfile | |
import shutil | |
import boto # you need to install "boto" == 'sudo pip install boto' | |
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
from datetime import timedelta |
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
##configure ssl with letsencrypt## | |
1. clone from git : | |
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
2. stop nginx service: | |
sudo systemctl stop nginx.service |
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
{ | |
"__inputs": [ | |
{ | |
"name": "DS_INFLUX", | |
"label": "influx", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "influxdb", | |
"pluginName": "InfluxDB" | |
} |
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 | |
export hosts="localhost" | |
export new_db="ratul" | |
export new_user="ratul" | |
export new_pass="ratul" | |
export backup_path="/var/backups/mongobackups" | |
export old_db="ooop" # existing database name which'll be migrated | |
sudo mkdir $backup_path |
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 flask import Flask | |
from flask import jsonify | |
from flask import request | |
from flask_pymongo import PyMongo | |
app = Flask(__name__) | |
app.config['MONGO_DBNAME'] = 'restdb' | |
app.config['MONGO_URI'] = 'mongodb://localhost:27017/restdb' |
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 flask import Flask, jsonify | |
from flask import request, abort, make_response | |
import os, sys | |
app = Flask(__name__) | |
dir = "/" | |
@app.route('/api/', defaults={'req_path': ''}) | |
@app.route('/api/<path:req_path>') | |
def get_tasks(req_path): |
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
import boto3 | |
import time | |
region = 'us-east-1' | |
image_name = "image_name" | |
instance_id = "i-0777a5dc8892fbdbb" | |
elb_name = 'elb' | |
instance_type = 't2.micro' | |
instance_tag_name = 'Friendly_Name' | |
AZ_name = 'us-east-1b' |
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
import os | |
import subprocess | |
import urllib | |
import boto3 | |
import botocore | |
import commands | |
# Version of Terraform that we're using | |
TERRAFORM_VERSION = '0.8.5' |
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
import boto3 | |
import collections | |
import datetime | |
import base64 | |
import os | |
region = os.environ['aws_regions'] | |
# aws_sns_arn = os.getenv('aws_sns_arn', None) | |
"""def send_to_sns(subject, message): |
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 microsoft/dotnet:2.1-runtime | |
WORKDIR /app | |
###################################################################################################################### | |
################################################# INSTALLING FFMPEG ################################################## | |
RUN apt-get update ; apt-get install -y git build-essential gcc make yasm autoconf automake cmake libtool checkinstall libmp3lame-dev pkg-config libunwind-dev zlib1g-dev libssl-dev | |
RUN apt-get update \ | |
&& apt-get clean \ |
OlderNewer