aws autoscaling describe-auto-scaling-instances \
| jq '.AutoScalingInstances[] | {AutoScalingGroupName, InstanceId}'
list instance IDs for a particular ASG
var url = require('url'); | |
var https = require('https'); | |
var querystring = require('querystring'); | |
var webhookID = 'YOUR/WEBHOOK/integration-id'; | |
var webhookURLBase = 'https://hooks.slack.com/services/'; | |
var webhookURL = [webhookURLBase, webhookID].join(''); | |
var slashCommandToken = 'your-slash-command-token'; |
#!/usr/bin/env python | |
import os | |
import sys | |
import yaml | |
def dir_to_dict(path): | |
directory = {} |
#!/usr/bin/env python | |
import os | |
import sys | |
import yaml | |
def dict_to_dir(data, path=str()): | |
"""dict_to_dir expects data to be a dictionary with one top-level key.""" |
Also see: https://gist.github.com/lemiorhan/8912188
Here are the simple steps needed to push your local git repository directly to a remote (e.g. prod) server over ssh. This is based on Digital Ocean's Tutorial.
You are developing in a working-directory on your local machine, let's say on the master
branch. Usually people push code to a remote
server like github.com or gitlab.com and pull or export it to a production server. Or you use GitHub's webhooks to send a POST request to a webserver to take appropriate actions such as cloning/checking out a branch on the remote (prod) server.
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
{ | |
"_id": 200325283, | |
"clientInterface": "mobile-iOS", | |
"totalFareWithCurrency": { | |
"amount": 1628000, | |
"currency": "IDR" | |
}, | |
"totalSeatSelectionFareWithCurrency": { | |
"amount": 0, | |
"currency": "IDR" |
Note: This setup assumes you are running Ubuntu 16.04 OS with Apache 2.4.23, older versions of Ubuntu (i.e. 14.04) require minor configuration changes in order for this setup to work.
Follow the install instructions for certbot
(letsencrypt's SSL manager) on https://certbot.eff.org/, making sure to select the correct server OS version.
Note: You only need to complete the Install
section, then return to this README in order to setup your SSL
#read more here http://tautt.com/best-nginx-configuration-for-security/ | |
#don't send the nginx version number in error pages and Server header | |
server_tokens off; | |
# config to don't allow the browser to render the page inside an frame or iframe | |
# and avoid clickjacking | |
add_header X-Frame-Options SAMEORIGIN; | |
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header, |
import avro.schema | |
import io, random | |
from avro.io import DatumWriter, DatumReader | |
import avro.io | |
# Path to user.avsc avro schema | |
schema_path="user.avsc" | |
schema = avro.schema.parse(open(schema_path).read()) | |