Inspired by jubalm's version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// more information here: http://blog.tomtasche.at/2012/10/use-built-in-feedback-mechanism-on.html | |
try { | |
int i = 3 / 0; | |
} catch (Exception e) { | |
ApplicationErrorReport report = new ApplicationErrorReport(); | |
report.packageName = report.processName = getApplication() | |
.getPackageName(); | |
report.time = System.currentTimeMillis(); | |
report.type = ApplicationErrorReport.TYPE_CRASH; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Restartes the parse log if it crashes | |
# stdbuf flushes the Parse log buffer so they come in real time | |
until stdbuf -oL /usr/local/bin/parse log -f > info.log; do | |
echo "Parse log crashed with exit code $?. Respawning.." >&2 | |
sleep 1 | |
done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Parse google map | |
// @namespace http://addodoc.com | |
// @version 0.1 | |
// @description Opens a Parse GeoPoint from the Data browser into a Google map on click | |
// @include https://parse.com/apps/rocket*collections | |
// @include https://www.parse.com/apps/rocket*collections | |
// @copyright 2012+, You | |
// ==/UserScript== | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.parse.ParseFile; | |
import com.parse.ParseGeoPoint; | |
import com.parse.ParseObject; | |
import java.io.Serializable; | |
import java.util.Date; | |
import java.util.HashMap; | |
public class ParseProxyObject implements Serializable { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Ref: https://github.com/circleci/android-cloud-test-lab/blob/master/circle.yml | |
export DIRECTORY="/var/jenkins_home/GoogleCloudSDK/google-cloud-sdk/bin" | |
if [ ! -d "$DIRECTORY" ]; then | |
# Control will enter here if $DIRECTORY doesn't exist. | |
cd /var/jenkins_home | |
wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip -O google-cloud-sdk.zip | |
unzip -o google-cloud-sdk.zip -d ./GoogleCloudSDK/ | |
./GoogleCloudSDK/google-cloud-sdk/install.sh | |
Install MySQL 5.6 in Ubuntu 16.04
Ubuntu 16.04 only provides packages for MySQL 5.7 which has a range of backwards compatibility issues with code written against older MySQL versions.
Oracle maintains a list of official APT repositories for MySQL 5.6, but those repositories do not yet support Ubuntu 16.04. However, the 15.10 repos will work for 16.04.
Uninstall existing mysql 5.7 if any
sudo apt remove mysql-client mysql-server libmysqlclient-dev mysql-common
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout --orphan temp | |
git rm -rf . | |
git commit --allow-empty -m 'Make initial root commit' | |
git rebase --onto temp --root develop | |
git push origin --force develop:develop | |
git push origin temp:master | |
git branch -D temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Source: https://stackoverflow.com/a/46266032/559680 | |
# Put these above server block (Don't forget to give write permissions to the cache folder): | |
# proxy_cache_path /opt/nginx/cache levels=1:2 keys_zone=default_cache:10m max_size=100m inactive=5m use_temp_path=off; | |
# proxy_cache_key "$scheme$request_method$host$request_uri"; | |
# proxy_cache_valid 200 302 60m; | |
# To use this in location: | |
# include enable-cache.conf | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Place this file in /home/osmc/.kodi/userdata | |
## Original at https://www.reddit.com/r/kodi/comments/6x7898/how_to_automatically_start_playing_an_inprogress/ | |
import time | |
time.sleep(10) | |
import os | |
import sqlite3 | |
import sys | |
import xbmc |