Skip to content

Instantly share code, notes, and snippets.

@wrygiel
wrygiel / proxy.php
Created Dec 6, 2012
USOS API proxy
View proxy.php
<?php
/* USOS API Base URL, trailing slash included. */
$usosapi_base_url = '';
/* Consumer Key to use. */
$consumer_key = '';
$consumer_secret = '';
/*
@wrygiel
wrygiel / providers.xml
Last active Dec 10, 2015
Example configuration of Locus map provider for OpenCaching.PL
View providers.xml
<?xml version="1.0" encoding="UTF-8"?>
<providers>
<!-- Google maps classic -->
<provider id="10020" type="0" visible="true" background="-1">
<name>Google</name>
<mode>Classic</mode>
<area></area>
<url><![CDATA[http://mt{s}.google.com/vt/lyrs=m@140&hl=en&x={x}&y={y}&z={z}]]></url>
<serverPart>0;1</serverPart>
<zoomPart>{z}-8</zoomPart>
@wrygiel
wrygiel / users.php
Last active Nov 21, 2018
Hello OKAPI
View users.php
<?php
$okapi_base_url = "https://opencaching.pl/okapi/";
$json = file_get_contents($okapi_base_url."services/apisrv/stats");
$data = json_decode($json);
print "Number of OpenCaching.PL users: ".$data->user_count;
@wrygiel
wrygiel / nearest_unfound.php
Last active Nov 21, 2018
Finding nearest unfound caches with OKAPI
View nearest_unfound.php
<?php
/* Enter your OKAPI's URL here. */
$okapi_base_url = "https://opencaching.pl/okapi/";
/* Enter your Consumer Key here. */
$consumer_key = "YOUR_KEY_HERE";
/* Caches found by this user will be EXCLUDED from the result. */
$username = "USERNAME_HERE";
@wrygiel
wrygiel / hello.php
Created Dec 6, 2012
Hello USOS API
View hello.php
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
/* USOS API Base URL, trailing slash included. */
$usosapi_base_url = '';
/* URL of THIS script. Required for callback support. */
$self_url = '';
@wrygiel
wrygiel / Smart AudioBook Player intents
Created Apr 15, 2020
Smart AudioBook Player intents
View Smart AudioBook Player intents
I bought a Flic button and wanted to use it with Smart AudioBook Player, so I decompiled the APK to discover intents.
Perhaps this might help someone.
package: ak.alizandro.smartaudiobookplayer
actions:
<action android:name="ak.alizandro.smartaudiobookplayer.ActionPlayPause"/>
<action android:name="ak.alizandro.smartaudiobookplayer.ActionPlay"/>
<action android:name="ak.alizandro.smartaudiobookplayer.ActionPause"/>
<action android:name="ak.alizandro.smartaudiobookplayer.ActionRewindBig"/>
You can’t perform that action at this time.