Skip to content

Instantly share code, notes, and snippets.

Aubort Jean-Baptiste rorist

Block or report user

Report or block rorist

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 Android SDK - AsyncTask
import android.app.Activity;
import android.content.Context;
import android.os.AsyncTask;
import java.lang.ref.WeakReference;
private class MyTask extends AsyncTask<String, Integer, Long> {
private WeakReference<Activity> mActivity;
public MyTask(Activity activity) {
@rorist
rorist / pedantically_commented_playbook.yml
Created Jan 18, 2016 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
View pedantically_commented_playbook.yml
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
View grab_mjpeg_frame.py
#!/usr/bin/env python
import socket
import sys
if len(sys.argv) != 3:
print "Usage: %s host:port destfile.jpg" % sys.argv[0]
sys.exit(1)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host, port = sys.argv[1].split(':')
@rorist
rorist / resizeForAndroid.py
Created Sep 13, 2012 — forked from corbett/resizeForAndroid.py
resize images for Android
View resizeForAndroid.py
import os
import glob
from PIL import Image
from math import ceil
xhdpi2hdpi=0.75
hdpi2mdpi=2/3.
mdpi2ldpi=0.75
for asset in glob.glob('drawable-xhdpi/*png'):
img = Image.open(asset)
xhdpi = img.size
@rorist
rorist / Android SDK - Handler
Created Oct 22, 2010
How to use Android's Handlers
View Android SDK - Handler
import android.os.Handler;
private static final int MYACTION = 1;
private static final int DELAY = 1000; // ms
private final Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case MYACTION:
@rorist
rorist / altchainfail.c
Created Jul 10, 2015
stand-alone vulnerability tester for: CVE-2015-1793
View altchainfail.c
/*
* alt.chain.fail
* stand-alone vulnerability tester for: CVE-2015-1793
* by: mancha (@mancha140)
*
* based on test written by Matt Caswell for the OpenSSL project.
*
* gcc -o altchainfail altchainfail.c -lcrypto
*
*/
View keybase.md

Keybase proof

I hereby claim:

  • I am rorist on github.
  • I am rorist (https://keybase.io/rorist) on keybase.
  • I have a public key whose fingerprint is 9492 6224 C090 1774 AE45 330E 9E02 DF5C 2DA5 AACA

To claim this, I am signing this object:

You can’t perform that action at this time.