Skip to content

Instantly share code, notes, and snippets.

Avatar

Jude Mwenda jmwenda

View GitHub Profile
View kibera_toilets.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View drinking_water.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pubsbarsalcohol.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:cb02d1f9e17e9833f882
curl --dump-header - -H "Content-Type: application/json" -H "X-CSRFToken: VhPYwzz4NJXnTPgkfSuSAQnN3HZ5AJj0" -H "Authorization: ApiKey jmwenda:123456789" -X POST --data '{"device": {"pk": 1}, "latitude": "latitude", "imei": "$$AF860041024247929", "time_stamp": "20140505211312", "altitude": 0, "speed": 0, "heading": "N", "longitude": "longitude"}' 'http://127.0.0.1/api/v1/devicerecord/?username=jmwenda&api_key=123456789'
View gist:f09866627647e852afc2
class DevicerecordResource(ModelResource):
device = fields.ForeignKey(DeviceResource, 'device',full=True)
class Meta:
queryset = DeviceRecord.objects.all()
resource_name = 'devicerecord'
allowed_methods = ['get','put','post']
authentication = ApiKeyAuthentication()
authorization = Authorization()
~
View gist:269e5f7dc0bf75435c21
[6/24/2014 7:06:22 AM] (41.90.62.219:62885/TZone/tcp) Disconnect
[6/24/2014 7:06:22 AM] (41.90.62.219:62885/TZone/tcp) Error: Could not parse $$BA860041024247929|AA$GPRMC,070619.000,A,0114.9180,S,03647.9184,E,1.11,24.75,240614,,,A*4C[0x0D][0x0A]
[6/24/2014 7:06:22 AM] (41.90.62.219:62885/TZone/tcp) Client: $$BA860041024247929|AA$GPRMC,070619.000,A,0114.9180,S,03647.9184,E,1.11,24.75,240614,,,A*4C[0x0D][0x0A]|01.4|00.7|01.2|000001000000|20140624070619|14152819|04000000|0003109E|0000|0.2613|0747||D875[0x0D][0x0A]
[6/24/2014 7:04:20 AM] (41.90.62.219:62885/TZone/tcp) Report: (36.79713, -1.24810166666667, 0) (9.45, 120.61) (6/24/2014 7:04:17 AM)(Low Battery=False x)(SOS=False x)(Fuel level=25.8575)(CellID=263.76 x)(OdometerAcc=1253.9)(Speed=9.45 x)
[6/24/2014 7:04:20 AM] (41.90.62.219:62885/TZone/tcp) Client: $$BA860041024247929|AA$GPRMC,070417.000,A,0114.8861,S,03647.8278,E,18.37,120.61,240614,,,A*4A|01.4|00.7|01.2|000001000000|20140624070417|14152859|04510000|00030479|0000|1.2539|0746||8414[0x0D][0x0A]
[6/24/20
View gist:aeb8e4c64c7e121bc84e
07-10 18:03:55.084: E/dalvikvm(2479): Could not find class 'org.mapsforge.map.android.view.MapView', referenced from method com.mapjack.BasicMapViewer.createLayerManagers
07-10 18:03:55.084: W/dalvikvm(2479): VFY: unable to resolve check-cast 107 (Lorg/mapsforge/map/android/view/MapView;) in Lcom/mapjack/BasicMapViewer;
07-10 18:03:55.084: D/dalvikvm(2479): VFY: replacing opcode 0x1f at 0x0011
07-10 18:03:55.085: E/dalvikvm(2479): Could not find class 'org.mapsforge.map.model.MapViewPosition', referenced from method com.mapjack.BasicMapViewer.createLayers
07-10 18:03:55.085: W/dalvikvm(2479): VFY: unable to resolve check-cast 117 (Lorg/mapsforge/map/model/MapViewPosition;) in Lcom/mapjack/BasicMapViewer;
07-10 18:03:55.085: D/dalvikvm(2479): VFY: replacing opcode 0x1f at 0x0009
07-10 18:03:55.085: E/dalvikvm(2479): Could not find class 'org.mapsforge.map.android.view.MapView', referenced from method com.mapjack.BasicMapViewer.createMapViewPositions
07-10 18:03:55.085: W/dalvikvm(2479): VFY: unable to resolve
View gist:b1ae5e17ecd4c50a5f06
import java.io.File;
import java.util.ArrayList;
import org.mapsforge.core.model.LatLong;
import org.mapsforge.core.model.MapPosition;
import org.mapsforge.map.android.AndroidPreferences;
import org.mapsforge.map.android.graphics.AndroidGraphicFactory;
import org.mapsforge.map.android.graphics.AndroidSvgBitmapStore;
import org.mapsforge.map.android.util.AndroidUtil;
View gist:0aa8aed1fa9dec923d68
package com.mapper;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends ActionBarActivity {
@Override
View gist:100158c186ab085aba1b
[2014-07-11 09:16:18 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/mapsforge/core/graphics/Align;
[2014-07-11 09:16:18 - Mapjack] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/mapsforge/core/graphics/Align;
You can’t perform that action at this time.