Skip to content

Instantly share code, notes, and snippets.

View sonOfRa's full-sized avatar

Simon Levermann sonOfRa

View GitHub Profile
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
find_package(JNI REQUIRED)
set(NEED_JNI_MD y)
else()
if(NOT DEFINED NEED_JNI_MD)
set(NEED_JNI_MD y)
endif()
if(NOT DEFINED JNI_H)
message(FATAL_ERROR "Need to specify jni.h location when cross-compiling. Please specify location with -DJNI_H=/path/to/jni.h")
endif()
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
find_package(JNI REQUIRED)
set(NEED_JNI_MD y)
else()
if(NOT DEFINED NEED_JNI_MD)
set(NEED_JNI_MD y)
endif()
if(NOT DEFINED JNI_H)
message(FATAL_ERROR "Need to specify jni.h location when cross-compiling. Please specify location with -DJNI_H=/path/to/jni.h")
endif()
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
find_package(JNI REQUIRED)
set(NEED_JNI_MD y)
else()
if(NOT DEFINED NEED_JNI_MD)
set(NEED_JNI_MD y)
endif()
if(NOT DEFINED JNI_H)
message(FATAL_ERROR "Need to specify jni.h location when cross-compiling. Please specify location with -DJNI_H=/path/to/jni.h")
endif()
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
find_package(JNI REQUIRED)
set(NEED_JNI_MD y)
else()
if(NOT DEFINED NEED_JNI_MD)
set(NEED_JNI_MD y)
endif()
if(NOT DEFINED JNI_H)
message(FATAL_ERROR "Need to specify jni.h location when cross-compiling. Please specify location with -DJNI_H=/path/to/jni.h")
endif()
#!/usr/bin/perl
''=~( '(?{' .('`' |'%') .('[' ^'-')
.('`' |'!') .('`' |',') .'"'. '\\$'
.'==' .('[' ^'+') .('`' |'/') .('['
^'+') .'||' .(';' &'=') .(';' &'=')
.';-' .'-'. '\\$' .'=;' .('[' ^'(')
.('[' ^'.') .('`' |'"') .('!' ^'+')
.'_\\{' .'(\\$' .';=('. '\\$=|' ."\|".( '`'^'.'
).(('`')| '/').').' .'\\"'.+( '{'^'['). ('`'|'"') .('`'|'/'
).('['^'/') .('['^'/'). ('`'|',').( '`'|('%')). '\\".\\"'.( '['^('(')).
/**
* Utility method to set any callback. This will set any callback that the
* specified Callback instance implements.
*
* @param callback
* the callback object to search for callbacks
* @throws ToxException
* if the instance has been killed at any point during execution
* of this method
*/
private static Map<Long, List<OnActionCallback>> actionCallbacks;
private static Map<Long, List<OnConnectionStatusCallback>> connectionStatusCallbacks;
private static Map<Long, List<OnFriendRequestCallback>> friendRequestCallbacks;
private static Map<Long, List<OnMessageCallback>> messageCallbacks;
private static Map<Long, List<OnNameChangeCallback>> nameChangeCallbacks;
private static Map<Long, List<OnReadReceiptCallback>> readReceiptCallbacks;
private static Map<Long, List<OnStatusMessageCallback>> statusMessageCallbacks;
private static Map<Long, List<OnUserStatusCallback>> userStatusCallbacks;
public interface MyCallback {
public void execute();
}
public class MyConcreteCallback implements Parcelable, MyCallback {
public void execute() {
doSomething();
}
// Parcelable stuff
}
private static Map<Long, JTox> fuckYouAndroid;
public recoverInstance() {
this = fuckYouAndroid.get(this.messengerPointer);
}
simon@Locutus linux32 % cat test.c && i686-pc-linux-gnu-gcc test.c && ./a.out
#include<stdio.h>
int main(void) {
printf("%d\n", sizeof(long));
}
4