Skip to content

Instantly share code, notes, and snippets.

@anismiles
anismiles / gist:4242073
Created December 8, 2012 21:35 — forked from SriramBms/gist:911144
Code snippet to manipulate the brightness of an image in Android
// It's assumed this function is defined in a class extending 'ImageView'
void addEffectBrightness(){
float brightness = mBrightnessValue;
mCm = new ColorMatrix();
mCm.set(new float[] { 1, 0, 0, 0, brightness,
0, 1, 0, 0,brightness,
0, 0, 1, 0, brightness,
0, 0, 0, 1, 0 });
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
@anismiles
anismiles / session.java
Created March 2, 2012 10:54
dummy session bean
package com.strumsoft.api;
import java.io.Serializable;
import java.util.Date;
/**
* @author "Animesh Kumar <animesh@strumsoft.com>"
*
*/
public class Session implements Serializable {
@anismiles
anismiles / pom.xml
Created February 3, 2014 10:01 — forked from elvanja/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.acme.test</groupId>
<artifactId>nodejs-dependency</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>nodejs-dependency</name>
<description>NodeJS Dependency Project - to be references in nodejs-test</description>
<packaging>jar</packaging>
@anismiles
anismiles / pom.xml
Created February 3, 2014 10:01 — forked from elvanja/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.acme.test</groupId>
<artifactId>nodejs-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>nodejs-test</name>
<description>NodeJS Test Project</description>
<packaging>jar</packaging>