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
{ | |
"links":[ | |
{ | |
"rel":"addphone", | |
"href":"http://localhost:8080/rest/account/v1/addphone", | |
"httpMethod":"POST", | |
"stateTransitionVars":{ | |
"phoneNumber": { | |
"countryCode": "", | |
"phoneNumber": "" |
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
var fs = require('fs'), | |
crypto = require('crypto'), | |
algorithm = 'aes-256-ctr', | |
password = 'd6F3Efeq', | |
payload = { | |
"id": "12345", | |
"description": "description", | |
"location": "123 street", | |
"userIdentity": { | |
"phoneNumber": "5550000000", |
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 centos:centos6 | |
#Install WGET | |
RUN yum install -y wget | |
#Install tar | |
RUN yum install -y tar | |
# Download JDK | |
RUN cd /opt;wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.tar.gz; pwd |
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
curl -X POST --data <filename> http://<URL> -H "key:value>" -H "<if multiple headers>" |
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
private FieldHelper fieldOne = null; | |
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException { | |
Object[] r = getRow(); | |
if (r == null) { | |
setOutputDone(); | |
return false; | |
} |
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 : https://simplifiedthinking.co.uk/2015/10/03/install-mqtt-server/ ) | |
Installing Brew | |
The Mosquitto MQTT Server can be easily installed using Homebrew. If it’s not installed on your system already, then a quick visit to the homepage will give you all you need to get going. Homebrew is an OS X Package Manager for installing and updating non-Mac OS X utilities that are more commonly found in other variants of Linux. To install the basic package manager run the following command. | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
Installing Mosquitto MQTT |
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
var AWS = require('aws-sdk'); | |
var dynamodb = new AWS.DynamoDB({ apiVersion: '2012-08-10' }); | |
var docClient = new AWS.DynamoDB.DocumentClient() | |
var params = { | |
TableName: "mytable", | |
FilterExpression: "#schedule_type = :schedule_type_val", | |
ExpressionAttributeNames: { | |
"#schedule_type": "schedule_type", | |
}, | |
// we can narrow the returned result - still does a full-scan |
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
#!/usr/bin/env bash | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
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
# EDITOR=nano sudo visudo | |
# Change the following line: (:i to insert + esc to go back + :w to save + :q to quit) | |
# Defaults env_reset | |
# to: | |
# Defaults env_reset,timestamp_timeout=960 # in minutes | |
export PATH=$PATH:. | |
# export PATH=$PATH:/usr/bin |