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 -x | |
set -e | |
# https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean | |
DESTINATION_IP=$1 | |
shift || (echo "E: Destination IP is not provided. Aborting"; exit 1) | |
ANCHOR_GW=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/gateway) |
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
// PUT YOUR PACKAGE HERE | |
// package com.mycompany.myproduct; | |
import android.content.Context; | |
import org.json.JSONArray; | |
import org.json.JSONObject; | |
import java.io.BufferedReader; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; |