Skip to content

Instantly share code, notes, and snippets.

View abeluck's full-sized avatar

Abel Luck abeluck

View GitHub Profile
defaults d-xmpp
log global
mode tcp
option redispatch
option tcplog
option tcpka
option clitcpka
option srvtcpka
timeout connect 5s

Keybase proof

I hereby claim:

  • I am abeluck on github.
  • I am abelxluck (https://keybase.io/abelxluck) on keybase.
  • I have a public key ASAXHrXl-Z07odFRgipNht7jtPUi4CrF9jpo1wATItzxyQo

To claim this, I am signing this object:

@abeluck
abeluck / gist:6243306
Last active April 14, 2020 04:43
Local HTTP server to stream an InputStream to MediaPlayer on Android
/**
* This is simple HTTP local server for streaming InputStream to apps which are capable to read data from url.
* Random access input stream is optionally supported, depending if file can be opened in this mode.
*
* from: http://stackoverflow.com/a/9096241
*/
public class StreamOverHttp{
private static final boolean debug = false;
private final Browser.FileEntry file;
@abeluck
abeluck / gist:5777275
Last active December 18, 2015 11:39
get all contacts with email
/**
* Get all contacts
* @return
*/
private Cursor getContacts()
{
String[] PROJECTION = new String[] {
ContactsContract.RawContacts._ID,
ContactsContract.Contacts.DISPLAY_NAME,
ContactsContract.Contacts.PHOTO_ID,
#!/bin/bash
# we must use the same support lib jar in all the dependencies
good_jar="app/libs/android-support-v4.jar"
# paths to libraries that need android-support
# all these libs depend on android-support-v4.jar
readarray <<END
external/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock
END
@abeluck
abeluck / tlspretense-vpn.sh
Created May 31, 2013 19:45
ipsec VPN setup script for Ubuntu >= 12.04
#!/bin/sh
#
# DO NOT RUN THIS SCRIPT ON YOUR COMPUTER
#
# This script installs a VPN on server with Ubuntu >= 12.04
#
# Based on voodoo-vpn.sh
# Copyright Thomas Sarlandie 2012
# See http://www.sarfata.org/posts/setting-up-an-amazon-vpn-server.md
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
@abeluck
abeluck / netcipher-test-results.txt
Created May 31, 2013 17:25
Testing NetCipher against tlspretense
Alias Description P/F Expected Actual Start Time Stop Time
---------------- ---------------- ---- -------- -------- ---------- ----------
baseline Baseline Happy T Pass connecte sentdata 2013-05-31 17:20:50 +0000 2013-05-31 17:20:59 +0000
wrongcname Wrong CNAME Pass rejected connecte 2013-05-31 17:20:59 +0000 2013-05-31 17:21:22 +0000
parentcname Parent domain's Pass rejected connecte 2013-05-31 17:21:22 +0000 2013-05-31 17:21:32 +0000
nullincname Null character i Pass rejected connecte 2013-05-31 17:21:32 +0000 2013-05-31 17:21:38 +0000
happysubjectaltn Hostname is a dn Pass connecte sentdata 2013-05-31 17:21:38 +0000 2013-05-31 17:21:45 +0000
happysubjectaltn hostname only a Pass connecte sentdata 2013-05-31 17:21:45 +0000 2013-05-31 17:22:08 +0000
wrongsubjectaltn hostname in neit Pass rejected connecte 2013-05-31 17:22:08 +0000 2013-05-31 17:22:54 +0000
wrongsubjectaltn hostname in subj Fail rejected sentdata 2013-05-31 17:22:54 +0000 2013-05-31 17:23:01
-----BEGIN CERTIFICATE-----
MIIDJTCCAg2gAwIBAgIECy0y7TANBgkqhkiG9w0BAQUFADAiMQswCQYDVQQGEwJV
UzETMBEGA1UEAwwKVHJ1c3RlZCBDQTAeFw0xMjEwMDUyMjIwMjFaFw0xMzEwMDUy
MjIwMjFaMCIxCzAJBgNVBAYTAlVTMRMwEQYDVQQDDApUcnVzdGVkIENBMIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6clG32L98j4S9CqddFeup+NyxZmd
SPuEqJpIJHPQn/oGDmqXg8qmDr+DayAKa2ZHVD0+p0ymBJ74kZlFg6apcE55WWet
VfE6L491zfAyIqgVET//OPmDd0pgiBo78NXgwVoThMZ/79/fa0BddV02xqqLNuD5
0lXYB918wEoN909y7kOtldcqSL0N8Ts0SHxXrT3zmh+t2Oz007khsq99W50VrYO+
qzmeUpf1lJopFwRkBpkw1JoXwUL36Kfzqp0KgjEcgdxJU2DsfDIIcqcZEkCFEU9x
dkaEq6pIAVT4Qegqb7oeLbMEyvRc253cMd5PkjITMa4DgbBeWrrm1QFm7wIDAQAB
From 6f2370a74b706d05e13f971f91caa1074e4c485e Mon Sep 17 00:00:00 2001
From: Abel Luck <abel@guardianproject.info>
Date: Wed, 24 Apr 2013 20:43:31 +0200
Subject: [PATCH] another Darwin fix
---
Makefile.android | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile.android b/Makefile.android
From 0e62582754cd6dcf95e16ff294d762fa88497469 Mon Sep 17 00:00:00 2001
From: Abel Luck <abel@guardianproject.info>
Date: Wed, 24 Apr 2013 20:25:34 +0200
Subject: [PATCH] detect NDK arch on Darwin
---
Makefile.android | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile.android b/Makefile.android