Skip to content

Instantly share code, notes, and snippets.

View justintoth's full-sized avatar

Justin Toth justintoth

View GitHub Profile
@justintoth
justintoth / gist:1860367
Created February 18, 2012 17:50
Android Error Log
I/InputReader( 312): dispatchTouch::touch event's action is 0, pending(waiting finished signal)=0
I/InputDispatcher( 312): Delivering touch to current input target: action: 0, channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)'
I/InputDispatcher( 312): Delivering touch to current input target: action: 0, channel 'TouchIntercepter (server)'
I/InputReader( 312): dispatchTouch::touch event's action is 1, pending(waiting finished signal)=0
I/InputDispatcher( 312): Delivering touch to current input target: action: 1, channel '4381ba68 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)'
I/InputDispatcher( 312): Delivering touch to current input target: action: 1, channel 'TouchIntercepter (server)'
I/AudioFlinger( 240): start output streamType (0, 1) for 1
I/AudioFlinger( 240): stop output streamType (0, 1) for 1
I/InputReader( 312): dispatchTouch::touch event's action is 0, pending(waiting finished signal)=0
I/InputDispatcher( 312): Delivering touch to current inpu
@justintoth
justintoth / gist:2003157
Created March 8, 2012 20:15
UserUpdate
{
"_id" : {
"DeviceId" : NumberLong("4128023241"),
"UserId" : 1
},
"IpAddressNumber" : NumberLong(255217216),
"Icon" : "#c23c3c/0",
"IconWeight" : 55,
"IconAlertId" : 39018,
"IconEventId" : 40,
public class UserView
{
public UserView()
{
}
public UserView(Models.Users.User.User user)
{
Id = user.Id;
FirstName = user.FirstName;
@justintoth
justintoth / RBA_Get_PermissionsByRole.sql
Created March 12, 2012 18:54
RBA_Get_PermissionsByRole
CREATE PROCEDURE [dbo].[RBA_Get_PermissionsByRole]
@RoleId INT
AS
BEGIN
SET NOCOUNT ON;
SELECT p.id as PermissionId, p.Name, p.[key] as [Key], parent.[key] as ParentKey, p.MaxBits, p.MinBits, rp.PermissionBit, dp.[key] as [Dependency]
FROM role_permission rp WITH (NOLOCK)
JOIN permission p WITH (NOLOCK) ON rp.permissionid = p.id
LEFT JOIN permission parent WITH (NOLOCK) ON p.parentid = parent.id
@justintoth
justintoth / form.htm
Created March 12, 2012 20:41
Keyfob Submit
<form action="http://localhost/NavtrakAPI/api/peripherals/create/?authUserId=37853&authGuid=4cc1afa9-12f6-47da-af48-3103c56311dc" method="post">
<div>
Name: <input name="peripheral.Name" value="@Model.Name" />
</div>
<br />
<div>
Serial Number: <input name="peripheral.SerialNumber" value="@Model.SerialNumber" />
</div>
@justintoth
justintoth / gist:2251294
Created March 30, 2012 12:47
Send_ICD15_Garmin_Job_To_Offline_Vehicle
> Description: Send an icd 15 garmin job to offline vehicle then sign on and validate that job gets sent
> Sending sign off to vehicle server from vehicle 255.255.202.020
Received message: Peripheral Type: Garmin<br/>Message Type: Garmin Text Message<br/>Origination Time: 2/1/2012 4:52 PM<br/>Text Message: Test Driver: Hello World 2/1/2012 11:53:02 AM<br/>
Received message: Peripheral Type: Garmin<br/>Message Type: Garmin Text Message<br/>Origination Time: 2/1/2012 8:45 PM<br/>Text Message: Test Driver: Hello World 2/1/2012 3:45:51 PM<br/>
Received message: Peripheral Type: Garmin<br/>Message Type: Garmin Text Message<br/>Origination Time: 2/1/2012 8:47 PM<br/>Text Message: Test Driver: Hello World 2/1/2012 3:47:31 PM<br/>
Received message: Peripheral Type: Garmin<br/>Message Type: Garmin Text Message<br/>Origination Time: 2/1/2012 8:48 PM<br/>Text Message: Test Driver: Hello World 2/1/2012 3:48:41 PM<br/>
Received message: Peripheral Type: Garmin<br/>Message Type: Garmin Text Message<br/>Origination Time: 2/
------ Test started: Assembly: SystemTest.dll ------
> Description: Send an icd 15 garmin job to offline vehicle then sign on and validate that job gets sent
> Sending sign off to vehicle server from vehicle 255.255.202.020
> Sending job to leapfrog services (mimicking MyNavtrak)
> Job was sent successfully to leapfrog services
> Job with id 20432 was saved to jobs table
> Validated that vehicle 255.255.202.020 has correct driver testdriver@navtrak.net with user id 52510 assigned to it
> Validated that peripheral with id 29 has correct driver testdriver@navtrak.net with user id 52510 assigned to it
> Offline job was not received yet
@justintoth
justintoth / HttpStatusCode.cs
Created April 3, 2012 13:19
HttpStatusCode
#region Assembly System.dll, v4.0.0.0
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll
#endregion
using System;
namespace System.Net
{
// Summary:
// Contains the values of status codes defined for HTTP.
@justintoth
justintoth / Map.js
Created April 11, 2012 00:02
Map.js
function Map() {
var self = this;
this.top = 0;
this.bottom = 0;
this.latitude = 0;
this.longitude = 0;
this.delta = 0.1;
this.display = "map";
@justintoth
justintoth / ListingMapView.js
Created April 11, 2012 00:02
ListingMapView.js
function createListingMapView(latitude, longitude) {
return tt.ui.createWindow("Listing Map", function () { listingsmap.init(latitude, longitude); });
}
var listingsmap = {
init: function (latitude, longitude) {
listingsmap.coordinates = { Latitude: latitude, Longitude: longitude };
listingsmap.display();