Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Alashov Berkeli alashow

🏠
Working from home
View GitHub Profile
@webile-android
webile-android / MainActivity.java
Created Jul 6, 2011
An android activity which demonstrates picking a photo from gallery and uploading it to a remote server.
View MainActivity.java
package com.webile.upload;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.InputStreamReader;
import java.util.Date;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
@ishikawa
ishikawa / gist:88599
Created Apr 1, 2009
Java Sample Code for Calculating HMAC-SHA1 Signatures
View gist:88599
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Formatter;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
/**