Skip to content

Instantly share code, notes, and snippets.

View jorgenpt's full-sized avatar

Jørgen Tjernø jorgenpt

View GitHub Profile
public class EnvironmentScript extends BuildWrapper implements MatrixAggregatable {
@Override
public Environment setUp(AbstractBuild build,
final Launcher launcher,
final BuildListener listener) throws IOException, InterruptedException {
listener.getLogger().println("I'm here!");
// ....
public class EnvironmentScript extends BuildWrapper {
@SuppressWarnings("rawtypes")
@Override
public Environment setUp(AbstractBuild build,
final Launcher launcher,
final BuildListener listener) throws IOException, InterruptedException {
// ... skip ...
return new Environment() {
<?xml version="1.0" encoding="UTF-8"?>
<project name="com.lookout.custom_rules">
<!-- We use this target to access the "hidden" -compile target. -->
<target name="compile-debug" depends="-set-debug-mode, -crunch, -compile, -record-build-info" />
<target name="compile-release" depends="-set-release-mode, -crunch, -compile, -record-build-info" />
</project>
@jorgenpt
jorgenpt / assert_sdk_version.sh
Created June 5, 2012 23:27
Shell script to check for Android SDK version.
#!/bin/bash
# Bash script to assert that the current version of the SDK is at least the
# specified version. Prints 'true' to standard out if it's the right version,
# 'false' if it's not.
#
# Typically used like this, in your Makefile:
#
# ifneq ($(shell $(LOCAL_PATH)/assert_sdk_version.sh "r16"),true)
# $(error SDK version r16 or greater required)
@jorgenpt
jorgenpt / stream.sh
Created April 21, 2012 06:59
Commands to stream desktop to justin.tv on OS X
#!/bin/sh -xe
API_KEY="YOUR_API_KEY_GOES_HERE"
FPS="10"
VLC_PATH="/Applications/VLC.app/Contents/MacOS/VLC"
# I don't know how this'll behave on multimon, so you might want to hard-code.
# INRES='1440x900'
INRES=$(osascript -e 'tell application "Finder" to get bounds of window of desktop'|sed 's/, /x/g'|cut -f3- -dx)
OUTRES='1280x800'
# You can change this to record microphone or something else, from man soxformat (under coreaudio):
checking for FRIBIDI... configure: error: Package requirements (fribidi >= 0.19.0) were not met:
No package 'fribidi' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables FRIBIDI_CFLAGS
and FRIBIDI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
bool MouseLocationInWorld(out Vector3 location)
{
RaycastHit hit;
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast (ray, out hit, 100))
{
location = hit.point;
return true;
}
UIImageView *nextView = [[UIImageView alloc] initWithImage:[self imageAtIndex:imageIndex]];
[nextView setUserInteractionEnabled:YES];
[nextView setGestureRecognizers:[currentImage gestureRecognizers]];
[currentImage setGestureRecognizers:nil];
[[self view] addSubview:nextView];
[[self view] sendSubviewToBack:nextView];
[nextView release];
@jorgenpt
jorgenpt / assert_ndk_version.sh
Last active February 21, 2023 06:05
Shell script to check for Android NDK version.
#!/bin/bash
# Bash script to assert that the current version of the NDK is at least the
# specified version. Prints 'true' to standard out if it's the right version,
# 'false' if it's not.
#
# Typically used like this, in your jni/Android.mk:
#
# ifneq ($(shell $(LOCAL_PATH)/assert_ndk_version.sh "r5c"),true)
# $(error NDK version r5c or greater required)