- syncing with the main repo if we already have changes is a pain
- define
remoteOrigin
(the external remote name of the root repo) - define
ownOrigin
(the remote name of our fork) - define
syncBranch
(the branch which we will get in sync)
#include <string.h> | |
#include <stdio.h> | |
#include <malloc.h> | |
#include <jni.h> | |
const char *getSignature(JNIEnv *env, jobject context) { | |
// Build.VERSION.SDK_INT | |
jclass versionClass = (*env)->FindClass(env, "android/os/Build$VERSION"); | |
jfieldID sdkIntFieldID = (*env)->GetStaticFieldID(env, versionClass, "SDK_INT", "I"); | |
int sdkInt = (*env)->GetStaticIntField(env, versionClass, sdkIntFieldID); |
#!/bin/bash | |
# some helper vars | |
# https://unix.stackexchange.com/a/10065/138249 | |
if test -t 1; then | |
ncolors=$(tput colors) | |
if test -n "$ncolors" && test $ncolors -ge 8; then | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
success=$(tput setaf 2) |
gradle.taskGraph.afterTask { task, state -> | |
if (task. state.failure) { | |
println "$task.name FAILED PRINTING LOGS" | |
getDevicesAndReadLogs(500) | |
} | |
} | |
ext.getDevicesAndReadLogs = { count = 2500 -> | |
try { | |
def outstream = new ByteArrayOutputStream() |
package com.fyusion.fyuse.item; | |
import android.content.Context; | |
import android.support.annotation.IdRes; | |
import android.support.annotation.LayoutRes; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
#ABOUT
#INSTALLATION Run following commands:
apt-get install curl -y
curl https://gist.githubusercontent.com/mikepenz/bea8ef149c4c04917f04/raw/7fded476f46b156e3bc3cb8b0696fa27267c6b78/debianessentials.sh | sh;
public class CachingUtil { | |
public <C> List<C> loadParsed(Class<C> type, String locale) { | |
String name = getName(type); | |
Path path = Paths.get(Config.getEntry("paths.cache") + "/" + name + "/", name + "." + locale + ".json"); | |
if (Files.exists(path) && !Files.isDirectory(path)) { | |
try { | |
return new ObjectMapper() | |
.readValue(path.toFile(), new ObjectMapper().getTypeFactory().constructCollectionType(List.class, type)); |
<?php | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: GET, POST'); | |
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); | |
require "JSONDB.php"; | |
if(isset($_GET["limit"])) { | |
$limit = $_GET["limit"]; | |
} else { |
Verifying that +mikepenz is my Bitcoin username. You can send me #bitcoin here: https://onename.io/mikepenz |
#ABOUT
#INSTALLATION Run following commands:
curl https://gist.githubusercontent.com/mikepenz/a8a4a52f67a391895a4c/raw/0e142a381ddce88e7489d0753388bd9778cb246d/multitail.sh | sh;
source ~/.bashrc
This will start the script multitail.sh and call source ~/.bashrc afterwards