- Get and Start Kong and Co
git clone https://github.com/Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
- Create Kong API Route
package com.solarfighter.activities; | |
import java.io.IOException; | |
import java.net.InetAddress; | |
import javax.jmdns.JmDNS; | |
import javax.jmdns.ServiceEvent; | |
import javax.jmdns.ServiceListener; | |
import android.content.Context; |
public static InputStream resizeImage(InputStream inputStream, int width, int height) throws IOException { | |
BufferedImage sourceImage = ImageIO.read(inputStream); | |
Image thumbnail = sourceImage.getScaledInstance(width, height, Image.SCALE_SMOOTH); | |
BufferedImage bufferedThumbnail = new BufferedImage(thumbnail.getWidth(null), | |
thumbnail.getHeight(null), | |
BufferedImage.TYPE_INT_RGB); | |
bufferedThumbnail.getGraphics().drawImage(thumbnail, 0, 0, null); | |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
ImageIO.write(bufferedThumbnail, "jpeg", baos); | |
return new ByteArrayInputStream(baos.toByteArray()); |
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 | |
# Move protoc to /usr/local/bin/ | |
sudo mv protoc3/bin/* /usr/local/bin/ | |
# Move protoc3/include to /usr/local/include/ |
const fs = require('fs'); | |
const Converter = require('./converter.js'); | |
const options = { | |
name: process.argv[3], | |
description: process.argv[4], | |
activate: process.argv[5], | |
}; | |
const converter = new Converter(JSON.parse(fs.readFileSync(process.argv[2])), options); |
vi /etc/environment | |
# add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
logs/ |
abs(float)
- Returns the absolute value of a given float.
Example: abs(1)
returns 1
, and abs(-1)
would also return 1
,
whereas abs(-3.14)
would return 3.14
. See also the signum
function.
basename(path)
- Returns the last element of a path.
base64decode(string)
- Given a base64-encoded string, decodes it and
returns the original string.
''' | |
Author: Brian Oliver II | |
Instagram: bolo_ne3 | |
License: | |
MIT License | |
Copyright (c) 2016 Brian Oliver II | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal |