Skip to content

Instantly share code, notes, and snippets.

View avianey's full-sized avatar
🏕️
Living

Antoine Vianey avianey

🏕️
Living
View GitHub Profile
@avianey
avianey / ca cert
Last active August 24, 2017 09:31
Self signed client / server certificat
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 / Curated JS Links
Created January 19, 2017 08:09
Curated JS Links
@avianey
avianey / astro.py
Last active September 10, 2015 13:55 — forked from pepijndevos/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 / gist:497f9c69d198ea7dd59b
Created October 11, 2014 14:02
Libgdx square AndroidFragmentApplication that fills as much of the screen as possible
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;