This file contains hidden or 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, send_file, send_from_directory | |
| from flask.ext.cors import CORS | |
| import GMLib | |
| app = Flask(__name__) | |
| CORS(app) | |
| @app.route("/") | |
| def hello(): |
This file contains hidden or 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 json | |
| from jinja2 import Template | |
| import glob, os | |
| from subprocess import call | |
| def listProviders(): | |
| path = 'providers' | |
| plugins = glob.glob(os.path.join(path, '*')) | |
| p = dict() |
This file contains hidden or 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 requests | |
| apiurl="http://abc,xyz" | |
| clientId = "471" | |
| password = "hshsh" | |
| sourceMsisdn = "hshsh" | |
| messageText="Get your latest mobile games here" | |
| count = 0 | |
| with open('list.csv') as f: | |
| content = f.readlines() |
This file contains hidden or 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/python | |
| import sys | |
| import json | |
| ''' | |
| Base data of the user. |
This file contains hidden or 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 random | |
| from pprint import pprint | |
| from libcloud.compute.types import Provider | |
| from libcloud.compute.providers import get_driver | |
| API_KEY = 'putApiKeyHere' | |
| API_SECRET_KEY = putSecretKeyHere' | |
| cls = get_driver(Provider.EXOSCALE) |
This file contains hidden or 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
| ansible-playbook playbook.yml --private-key=pathToPrivateKey |
This file contains hidden or 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 playbook deploys a base installation of Oracle Java 8 | |
| - hosts: bal_ansible_exoscale | |
| remote_user: ubuntu | |
| become: yes | |
| roles: | |
| - java8 |
This file contains hidden or 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 | |
| ''' | |
| Example custom dynamic inventory script for Ansible, in Python. | |
| ''' | |
| import os | |
| import sys | |
| import argparse |
This file contains hidden or 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
| package br.com.xicojunior.redistest; | |
| import java.util.List; | |
| import redis.clients.jedis.Jedis; | |
| public class MessageConsumer | |
| { | |
| public static void main( String[] args ) | |
| { |
This file contains hidden or 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
| public class ImageUploader { | |
| public void uploadImage(HttpServletRequest request){ | |
| String imagePath = saveImage(request); | |
| String jsonPayload = createJsonPayload(request, imagePath); | |
| jedis.rpush("queue", jsonPayload); | |
| //... keep with the processing | |
| } |