Skip to content

Instantly share code, notes, and snippets.

View rjeschke's full-sized avatar

René Jeschke rjeschke

  • Viaboxx GmbH
  • Bonn, Germany
View GitHub Profile

Keybase proof

I hereby claim:

  • I am rjeschke on github.
  • I am rjeschke (https://keybase.io/rjeschke) on keybase.
  • I have a public key ASASQxBKUFAQUzNIxIPW2eoXbzdHQ1VJUvskLHE05U1fXQo

To claim this, I am signing this object:

@rjeschke
rjeschke / BlockingWebViewClient.java
Created January 4, 2016 16:09
Basic WebView blocking using libadblockplus
import java.io.File;
import java.util.regex.Pattern;
import org.adblockplus.android.ABPEngine;
import org.adblockplus.libadblockplus.FilterEngine.ContentType;
import android.content.Context;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@rjeschke
rjeschke / Template.java
Last active December 3, 2015 13:12
Simple and fast, single-file template system, designed for: create once, render often/concurrently
/*
* Copyright (C) 2015 René Jeschke <rene_jeschke@yahoo.de>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rjeschke
rjeschke / hgit.py
Last active August 29, 2015 13:57
WIP of finally working git-for-hg
#!/usr/bin/env python
# vim:fileencoding=utf-8:et:ts=4:sts=4
#
# Copyright 2014 René Jeschke <rene_jeschke@yahoo.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rjeschke
rjeschke / OpenCLKernel.hpp
Last active June 7, 2018 12:57
OpenCL C language feature emulation include file for Eclipse CDT. This header allows OpenCL kernels to be edited in Eclipse using C++ mode with syntax highlighting and auto-completion. The header contains all basic types and functions for OpenCL 1.2. 'Half' support and extensions are not yet implemented.
/*
* Copyright (C) 2013 René Jeschke <rene_jeschke@yahoo.de>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rjeschke
rjeschke / jb.sh
Last active December 17, 2015 17:09
jnibuild bash script
#!/bin/bash
artifact=~/.m2/repository/com/github/rjeschke/jnibuild/0.1-SNAPSHOT/jnibuild-0.1-SNAPSHOT.jar
if [ ! -f $artifact ]
then
mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get -DrepoUrl=http://maven.renejeschke.de/snapshots/ -Dartifact=com.github.rjeschke:jnibuild:0.1-SNAPSHOT
fi
java -cp $artifact com.github.rjeschke.jnibuild.Build $@
@rjeschke
rjeschke / NJOCLSample.java
Last active December 17, 2015 02:58
OpenCL bindings for Java
import java.nio.FloatBuffer;
import com.github.rjeschke.neetutils.collections.Colls;
import com.github.rjeschke.njocl.Buffers;
import com.github.rjeschke.njocl.CL;
import com.github.rjeschke.njocl.CLException;
import com.github.rjeschke.njocl.CommandQueue;
import com.github.rjeschke.njocl.Context;
import com.github.rjeschke.njocl.Device;
import com.github.rjeschke.njocl.Kernel;
@rjeschke
rjeschke / Float128.java
Created June 22, 2012 09:37
128 bit floats in software (Java)
/*
* Copyright (C) 2012 René Jeschke <rene_jeschke@yahoo.de>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rjeschke
rjeschke / gist:2851502
Created June 1, 2012 11:42
Hetzner VQ19 UnixBench results
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: neetsrv: GNU/Linux
OS: GNU/Linux -- 2.6.32-39-server -- #86-Ubuntu SMP Mon Feb 13 23:15:11 UTC 2012
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: QEMU Virtual CPU version 0.12.3 (6823.0 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
13:13:19 up 1 day, 21:06, 1 user, load average: 0.00, 0.00, 0.00; runlevel 2
@rjeschke
rjeschke / git-push.sh
Created May 31, 2012 21:09
Git-push-current-branch script with safety-net
#!/bin/bash
branch="$(git symbolic-ref HEAD 2>/dev/null)";
branch=${branch##refs/heads/};
echo "Command: git push origin $branch";
while true; do
read -p "Is this correct? [yn] " yn
case $yn in