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
git clone https://github.com/mossey/laravel-nairobi-demo-app.git | |
cd laravel-nairobi-demo-app | |
docker build -t laravel-demo . | |
docker run -p 80:80 -e private="foo" -e public="bar" -e APP_KEY="base64:IWcCHC1eD+5Y4LNWFznWoJ5faXYmABGB4ZPrWLWmU+Y=" laravel-demo |
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
eksctl create cluster \ | |
--name demo-cluster \ | |
--version 1.14 \ | |
--region us-west-2 \ | |
--nodegroup-name standard-workers \ | |
--node-type t2.micro \ | |
--nodes 2 \ | |
--nodes-min 1 \ | |
--nodes-max 2 \ | |
--managed |
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
#!/bin/bash | |
sudo yum update -y | |
sudo yum install docker -y | |
sudo service docker start | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
docker run -p 82:80 -d nginxdemos/hello | |
docker run -p 80:80 -e private="foo" -e public="bar" -e APP_KEY="base64:IWcCHC1eD+5Y4LNWFznWoJ5faXYmABGB4ZPrWLWmU+Y=" mosseyo/laravel-demo:001 |
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 php:7-fpm-alpine | |
RUN apk --update add wget \ | |
curl \ | |
git \ | |
grep \ | |
nginx \ |
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
""" | |
Copies all keys from the source Redis host to the destination Redis host. | |
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are | |
restricted (e.g. on Amazon ElastiCache). | |
The script scans through the keyspace of the given database number and uses | |
a pipeline of DUMP and RESTORE commands to migrate the keys. | |
Requires Redis 2.8.0 or higher. |
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, request, jsonify, json | |
app = Flask(__name__) | |
# the route is /getjson | |
# the method we use is POST | |
# the data is {"name":"Moses Nandwa","age":"10 years"} | |
@app.route('/getjson', methods=['POST']) | |
def add_message(): |
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
{"lastUpload":"2018-07-10T16:58:55.808Z","extensionVersion":"v2.9.2"} |
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 azure.servicebus import ServiceBusService | |
from azure.servicebus import Message | |
key_name = "component" # SharedAccessKeyName from Azure portal | |
key_value = "GQ0I5xfvkOKU4u719LeXEQV7U/iiSJBmcD7HwA05rt4=" # SharedAccessKey from Azure portal | |
sbs = ServiceBusService("dev-bonga-asb", | |
shared_access_key_name=key_name, | |
shared_access_key_value=key_value) | |
msg = Message( | |
' {"trackingID":"mljdlkasjldkjasldkjlaksd", "senderJID":"moses@localhost","conversationID":"jsalkjdlkjakldjaklsdjlkasjd","transactionUUID":"***[email protected]\\/0303\\/2727 04:55:03","transactionType":"AccountBalance","responseCode":"00","responseDescription":"697.00"}') |
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
%%% | |
%%% ejabberd configuration file | |
%%% | |
%%%' | |
%%% The parameters used in this configuration file are explained in more detail | |
%%% in the ejabberd Installation and Operation Guide. | |
%%% Please consult the Guide in case of doubts, it is included with | |
%%% your copy of ejabberd, and is also available online at | |
%%% http://www.process-one.net/en/ejabberd/docs/ |
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 ruby | |
# Jabber-SH — SH console via XMPP/Jabber (GTalk) | |
# | |
# Jabber-SH allows you to administrate a remote computer via a command line | |
# through a Jabber client. It’s like SSH via GoogleTalk! :) | |
# This is just a hack but it might be usefull sometime to run basic commands | |
# on a machine that is not accessible via ssh. | |
# | |
# Philippe Creux. pcreux/AT/gmail/DOT/com |
NewerOlder