Skip to content

Instantly share code, notes, and snippets.

Avatar

Jakub Jelen Jakuje

View GitHub Profile
View overwrite_function.js
isOldGeocachingDomain = isGeocachingDomain
function isGeocachingDomain(url) {
if (isOldGeocachingDomain(url)
|| url == "project-gc.com"
|| url == "www.project-gc.com") {
return true;
}
@Jakuje
Jakuje / stylish.geocaching.css
Created Jun 23, 2016
geocaching.com/pocket move button
View stylish.geocaching.css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.geocaching.com") {
#ctl00_ContentBody_btnSubmit {
position:absolute;
top:10px;
left:10px
}
}
@Jakuje
Jakuje / update_gpx.sh
Created May 20, 2015
Using xsl transfrom gpx to txt file used by Navit on my webOS phone
View update_gpx.sh
#!/bin/bash
#FILENAME="9897043"
FILENAME=$1
#wget -O ${FILENAME}.gpx "http://www.geocaching.com/pocket/downloadpq.ashx?g=fba142aa-e661-4533-ad6d-3220b900241c&src=web"
[ -f "${FILENAME}.zip" ] && unzip "${FILENAME}.zip"
xsltproc ~/.local/bin/gpx2navit.xsl ${FILENAME}{,-wpts}.gpx > ${FILENAME}_nav.txt
cat ${FILENAME}_nav.txt | novaterm put file:///media/internal/appdata/org.webosinternals.navit/maps/cache.txt
@Jakuje
Jakuje / gpx2navit.xsl
Last active Aug 29, 2015
Simple transformation for GPX files into files readable by Navit mobile navigation (with specialization for Geocaching)
View gpx2navit.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:g="http://www.topografix.com/GPX/1/0">
<xsl:output method="text"/>
<xsl:template match="g:gpx">
<xsl:for-each select="g:wpt">
<xsl:choose>
<xsl:when test="g:type = 'Waypoint|Parking Area'">
<xsl:text>type=poi_car_parking label="</xsl:text>
</xsl:when>
<xsl:when test="starts-with(g:type, 'Geocache')">
<xsl:text>type=poi_attraction label="</xsl:text>