Skip to content

Instantly share code, notes, and snippets.

View justintoth's full-sized avatar

Justin Toth justintoth

View GitHub Profile
@justintoth
justintoth / TouchImageView.cs
Created April 14, 2014 16:39
TouchImageView.java port to Xamarin Droid C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
export const RouteNames = {
SECTION_ROOT: 'section_root',
SECTION_SECURE: 'section_secure',
SECTION_HOME: 'section_home',
SECTION_SEARCH: 'section_search',
SECTION_MY_MARRIAGE: 'section_my_marriage',
SECTION_FULL_QUIZ: 'section_full_quiz',
ACCESSIBILITY_CONTROLS: 'accessibility_controls',
ACCOUNT_EDIT: 'account_edit',
@justintoth
justintoth / .zshrc
Created December 23, 2022 16:31
.zshrc file that leverages nvm
# Get nvm to work in VS Code npm scripts...
cdnvm() {
command cd "$@" || return $?
nvm_path=$(nvm_find_up .nvmrc | tr -d '\n')
# If there are no .nvmrc file, use the default nvm version
if [[ ! $nvm_path = *[^[:space:]]* ]]; then
declare default_version;
default_version=$(nvm version default);
@justintoth
justintoth / BiometricHelper.cs
Created October 29, 2018 14:25
BiometricPrompt implementation for Xamarin Android
using System;
using Android.Content.PM;
using Android.Hardware.Biometrics;
using Android.OS;
using Android.Runtime;
using Android.Security.Keystore;
using Android.Util;
using Java.Lang;
using Java.Security;
using Java.Security.Spec;
@justintoth
justintoth / ImportMapBoxTiles.cs
Created June 24, 2020 20:58
Import MapBox Tiles
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using Amazon;
using Amazon.S3;
using Amazon.S3.Model;
using Newtonsoft.Json;
using Rpr.Common;
using System;
using Android.Content;
using Android.Content.PM;
using Android.Hardware.Biometrics;
using Android.OS;
using Android.Runtime;
using Android.Security.Keystore;
using Android.Util;
using Java.Lang;
using Java.Security;
@justintoth
justintoth / CustomEditText.cs
Created February 21, 2018 16:54
Custom edit text control with clear button for Xamarin Android
public class CustomEditText : EditText {
private Drawable clearButton;
protected CustomEditText (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {
}
public CustomEditText (Context context) : base (context) {
Init ();
}
Leg 7: Brandon - 7.5 miles
https://www.google.com/maps/dir/750+White+Horse+Rd+Gap,+PA+17527/10+N+Hollander+Rd+Intercourse,+PA+17534/@40.0159053,-76.0897365,13z/data=!4m29!4m28!1m20!1m1!1s0x89c646f287b55bc7:0xb723f3510d60189!2m2!1d-76.0187288!2d39.9964986!3m4!1m2!1d-76.0634903!2d40.0087816!3s0x89c64714ca892203:0xc5a133fb72670106!3m4!1m2!1d-76.0977588!2d40.0159939!3s0x89c63897fab209ff:0xbc0897b5a57bdb55!3m4!1m2!1d-76.1039764!2d40.0387453!3s0x89c63f4b3bf861cb:0x3bf8fb308c9b3066!1m5!1m1!1s0x89c63f4c80475107:0x7ba286ec03473848!2m2!1d-76.1029079!2d40.0399024!3e0
Leg 8: Justin - 5.1 miles
https://www.google.com/maps/dir/10+N+Hollander+Rd,+Gordonville,+PA+17529/752+Hollander+Rd,+New+Holland,+PA+17557/@40.0569313,-76.1211817,14z/data=!4m24!4m23!1m15!1m1!1s0x89c63f4c80475107:0x7ba286ec03473848!2m2!1d-76.1029079!2d40.0399024!3m4!1m2!1d-76.1125483!2d40.0584449!3s0x89c63f3e295a1bb3:0xfa16fff57002f875!3m4!1m2!1d-76.1250871!2d40.0618887!3s0x89c63f1931d16f9d:0x6e0fdf79259c7332!1m5!1m1!1s0x89c63f7458bff955:0x7e78999707905652
@justintoth
justintoth / Justin Ragnar Legs.txt
Created May 30, 2017 21:30
Justin Ragnar Legs
Leg 1 (8): 5.1 miles
Elev gain: 269 ft, elev loss: 276 ft
Description: flat throughout
https://www.google.com/maps/dir/10+N+Hollander+Rd,+Gordonville,+PA+17529/752+Hollander+Rd,+New+Holland,+PA+17557/@40.0569313,-76.1211817,14z/data=!4m24!4m23!1m15!1m1!1s0x89c63f4c80475107:0x7ba286ec03473848!2m2!1d-76.1029079!2d40.0399024!3m4!1m2!1d-76.1125483!2d40.0584449!3s0x89c63f3e295a1bb3:0xfa16fff57002f875!3m4!1m2!1d-76.1250871!2d40.0618887!3s0x89c63f1931d16f9d:0x6e0fdf79259c7332!1m5!1m1!1s0x89c63f7458bff955:0x7e78999707905652!2m2!1d-76.1059093!2d40.0738867!3e0?hl=en
Leg 2 (20): 7.5 miles
Elev gain: 708 ft, elev loss: 400 ft
Description: 2 miles flat, climb until mile 4, flat until end
https://www.google.com/maps/dir/537+N+Main+St,+Bernville,+PA+19506/8373+PA-183,+Bethel,+PA+19507/@40.4745588,-76.1857725,13z/data=!4m29!4m28!1m20!1m1!1s0x89c60a9ea288515d:0x44dadbc996f7f9e2!2m2!1d-76.114046!2d40.436246!3m4!1m2!1d-76.1169433!2d40.4568061!3s0x89c5e03972da7ec9:0xc33936cf56e165bc!3m4!1m2!1d-76.1277346!2d40.468851!3s0x89c5e04
@justintoth
justintoth / WebRequestHelper.cs
Created April 16, 2013 19:15
Web Request Helper
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Configuration;
using System.IO;
namespace Housters.Business.Utility.Helpers {
public static class WebRequestHelper {