Skip to content

Instantly share code, notes, and snippets.

View ghuntley's full-sized avatar
minimalist

Geoffrey Huntley ghuntley

minimalist
View GitHub Profile
@ghuntley
ghuntley / get-all-markers-on-map-get-all-polygons-on-map-find-which-markers-are-within-a-polygon.js
Created February 26, 2013 05:29
Example of one way to integrate Leafletjs w/ Leaflet.draw extending it to add methods to: - Load markers from KML and overlay onto map. - Return array of all markers on a map. - Return array of all polygons on a map. - Return array of markers which are within a specified polygon. Requires UnderscoreJS and @shramov/leaflet-plugins (for KML loader…
// <summary>
// Logging methods.
// </summary>
Log = {
Dump: function (object)
{
if (object)
{
console.debug(object);
}

Basic example of taking an output from our server and putting it on a map. As leaflet allows you to add geoJSON directly, we convert it from esri's JSON format to a more standard one.

// assumes variable data, which is a homogenous collection of objects
// get keys
var keys = _.keys(data[0]);
// convert to csv string
var csv = keys.join(",");
_(data).each(function(row) {
csv += "\n";
csv += _(keys).map(function(k) {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using MonoTouch.UIKit;
namespace Async.iOS
{
public static class Layout
{
@ghuntley
ghuntley / mvvmcrossplanning
Created May 17, 2013 14:53
mvvmcross planning
@Cheesebaron @fastchicken and @gshackles. Here's the train of logic thats in my head to get to the end goal, in this order we'll catch more people to do the longtail goal (help with documentation) as perception of mature project is worth time invested to help out.
1) Brand, Mark and Identity:
- Secure project brand on social media.
- Collate images of how brand is being used or has been used.
- Collate collating slides, press mentions, training videos.
- Create definitive list of public applications powered by mvvmcross.
2) Website and UI/X design.
@ghuntley
ghuntley / mvvmcross-planning.txt
Created May 17, 2013 14:53
mvvmcross planning
@Cheesebaron @fastchicken and @gshackles. Here's the train of logic thats in my head to get to the end goal, in this order we'll catch more people to do the longtail goal (help with documentation) as perception of mature project is worth time invested to help out.
1) Brand, Mark and Identity:
- Secure project brand on social media.
- Collate images of how brand is being used or has been used.
- Collate collating slides, press mentions, training videos.
- Create definitive list of public applications powered by mvvmcross.
2) Website and UI/X design.
Greetings,
Enclosed in this electronic envelope is enough either for multiple horrible
beers or one of something more refined. A open source project, powered by beer
would like to commision you to draw for the project a horrible logo which we
may or may not use in the project documentation and main page depending on the
scale of horribleness.
re: background, who we are.
@ghuntley
ghuntley / gist:5642423
Created May 24, 2013 09:37
C# iOS network activity indicator control
using System;
using MonoTouch.UIKit;
namespace ClientCore
{
/// <summary>
/// Since we are a multithreaded application and we could have many
/// different outgoing network connections we need a centralized API
/// to keep the network visibility indicator state Network activity.
"When you're paid to help someone accomplish a goal (whether as employee or consultant),
you can only help in the areas where they are giving you permission to help. You may
see some area where the company is misguided, and you may indeed have the knowledge
or skill to help that area tremendously. But if they are not giving you permission
to help that area, then you will only hurt yourself and the company by trying to
"force" your help in that area. Stick to areas where they've given you permission,
and learn to let the rest roll off your back like water off a duck. Over time,
that may even gain you opportunities to help in other areas as well."
- https://en.wikipedia.org/wiki/Gerald_Weinberg
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;