Build a tool to mine the logs of a weather balloon for important information.
There is a weather balloon traversing the globe, periodically taking observations. At each observation, the balloon records the temperature
| package com.opentok.media.avc; | |
| import java.io.IOException; | |
| import java.nio.ByteBuffer; | |
| import android.media.MediaCodec; | |
| import android.media.MediaCodecInfo; | |
| import android.media.MediaFormat; | |
| public class AvcEncoder { |
| # Convert base64 string from Google to a pem file | |
| openssl enc -base64 -d -in publickey.base64 -A | openssl rsa -inform DER -pubin > public.pem | |
| # Decode base64 signature to binary | |
| openssl base64 -d -A -in signature.txt -out signature.sha1 | |
| # Verify signature | |
| openssl dgst -sha1 -verify public.pem -signature signature.sha1 receipt.json |
| Grab the certificate from the HTTPS server (e.g. Google) | |
| $ openssl s_client -connect google.com:443 | |
| Generate a Java keystore from certificate | |
| $ wget http://bouncycastle.org/download/bcprov-jdk16-146.jar | |
| $ keytool -importcert -file your_signing_certificate.pem -keystore app.keystore -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath bcprov-jdk16-146.jar -storetype BKS |
| /* | |
| * Copyright (C) 2012 CyberAgent | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| package com.snepo.common.widgets; | |
| import android.content.Context; | |
| import android.graphics.Canvas; | |
| import android.graphics.Paint; | |
| import android.graphics.Path; | |
| import android.graphics.Path.Direction; | |
| import android.graphics.Path.FillType; | |
| import android.graphics.PorterDuff.Mode; | |
| import android.graphics.PorterDuffXfermode; |