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 | |
# To use just set a variable with SSM_<target_env_var>=<ssm_parameter_store_path> | |
# e.g. SSM_database_password=prod/myservice/database-password | |
function get_parameter { | |
SSM_ENV_VAR_NAME=$1 | |
ENV_VAR_NAME=`echo "$SSM_ENV_VAR_NAME" | cut -c5-` | |
SSM_PARAM_NAME="${!SSM_ENV_VAR_NAME}" | |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
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
package com.company.app.PlatformMethods; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
import java.util.Set; | |
import android.app.PendingIntent; | |
import android.content.BroadcastReceiver; |
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 com.ghgande.j2mod.modbus.io.ModbusTCPTransaction; | |
import com.ghgande.j2mod.modbus.msg.ReadMultipleRegistersRequest; | |
import com.ghgande.j2mod.modbus.msg.ReadMultipleRegistersResponse; | |
import com.ghgande.j2mod.modbus.net.TCPMasterConnection; | |
import java.net.InetAddress; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
/** | |
* |