Skip to content

Instantly share code, notes, and snippets.

🏕
Living

Antoine Vianey avianey

🏕
Living
Block or report user

Report or block avianey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Revert version 321 of your app using apktool
java -jar apktool.jar d 321.apk
java -jar apktool.jar b 321 -o 323.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./your.keystore 323.apk alias
[android-sdk]/build-tools/27.0.2/zipalign -v 4 323.apk 323-aligned.apk
View Curated JS Links
@avianey
avianey / PowerSet.java
Created Aug 21, 2016
A fast bitmap backed PowerSet java implementation that supports size range ;-)
View PowerSet.java
package fr.pixelprose.count.generator;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import static com.google.common.base.Preconditions.checkArgument;
import static java.lang.Math.min;
@avianey
avianey / LibGDXCardDeck.java
Last active Oct 3, 2017
Generates LibGDX BitmapFont and TextureAtlas at build time with Gradle
View LibGDXCardDeck.java
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
View astro.py
import math
class Planet(object):
def __init__(self, name, a, e, i, l, lp, ln,
ac, ec, ic, lc, lpc, lnc):
self.name = name
self.a = a
self.ac = ac
self.e = e
@avianey
avianey / ca cert
Last active Aug 24, 2017
Self signed client / server certificat
View ca cert
openssl genrsa -out ca.key 2048
openssl req -new -key ./ca.key -out ./ca.csr
openssl x509 -req -days 365 -in ./ca.csr -out ./ca.crt -signkey ./ca.key
openssl x509 -in ca.crt -text
openssl rsa -in ca.key -passin pass:XXXX -pubout -out ca.public.key
@avianey
avianey / BusinessExceptionMapper.java
Last active Aug 29, 2015
Jersey custom parameter, annotation and exception mapping
View BusinessExceptionMapper.java
@Provider
public class BusinessExceptionMapper implements ExceptionMapper<BusinessException> {
private static final Logger log = Logger.getLogger(TestEndpoint.class.getName());
private static final ResourceBundle resource =
ResourceBundle.getBundle("com.blogspot.avianey");
@Override
public Response toResponse(BusinessException e) {
@avianey
avianey / gist:497f9c69d198ea7dd59b
Created Oct 11, 2014
Libgdx square AndroidFragmentApplication that fills as much of the screen as possible
View gist:497f9c69d198ea7dd59b
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
config.useAccelerometer = false;
config.useCompass = false;
config.useWakelock = true;
config.numSamples = 1;
config.resolutionStrategy = new ResolutionStrategy() {
@Override
public MeasuredDimension calcMeasures(int widthMeasureSpec, int heightMeasureSpec) {
int width = widthMeasureSpec;
You can’t perform that action at this time.