Skip to content

Instantly share code, notes, and snippets.

View ca0v's full-sized avatar

Corey Alix ca0v

  • Westfield, VT
View GitHub Profile
@ca0v
ca0v / getcaps.cs
Last active October 20, 2017 11:55
Potential bindings for WMS GetCapabilities
using System;
using System.Xml.Serialization;
using System.Collections.Generic;
namespace Xml2CSharp
{
[XmlRoot(ElementName="KeywordList", Namespace="http://www.opengis.net/wms")]
public class KeywordList {
[XmlElement(ElementName="Keyword", Namespace="http://www.opengis.net/wms")]
public List<string> Keyword { get; set; }
}
@ca0v
ca0v / config.xml
Created October 9, 2017 13:45
Map Application Sample Configuration
This file has been truncated, but you can view the full file.
<Maplet id="ips-base">
<MAP>
<SYMBOLOGY iconheight="48" iconwidth="48">
<SYMBOL about="imported from *" id="*" label="[PrettyName] Key# [PrimaryKey]" template="[PrettyName] Key# [PrimaryKey]">
<ICON about="imported from MapPin.png" height="0" id="MapPin.png" style="MapPin.png" type="file" width="0">
<FILTERS>
<FILTER about="IPS Moniker filter" key="moniker" value="*" />
</FILTERS>
</ICON>
</SYMBOL>
@ca0v
ca0v / schedule.markdown
Last active September 30, 2017 00:03
SoccER Fall 2017

Schedule

Schedule

Day Field Yellow Team Blue Team
9/30/2017 1 at 9 AM Andy Taylor Joseph Haire
9/30/2017 1 at 9 AM Eli Whitesell Alec Smith
9/30/2017 2 at 9 AM Brett Boyd Matt Staab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ca0v
ca0v / rhythm-gis.md
Last active March 5, 2019 12:59
For Stephen Stralka

app/app

The programmatic point-of-contact with the map control instantiated by liferay-runner and facilitated through the mediator.

The create method bootstraps the maplet environment and passes control to an applications/rhythm-gis-app instance, which has access to this API as well as the underlying configuration.

If no configuration is provided create() queries the rest service for the 'base' configuration.

@ca0v
ca0v / pgrouting.sql
Last active April 12, 2017 04:02
pgrouting setup
/*
highway types by count
11466531 residential
10299767 null
5460331 service
1148498 footway
1137593 track
767727 tertiary
@ca0v
ca0v / debounce.ts
Last active May 27, 2025 07:32
Typescript Debounce
// ts 3.6x
function debounce<T extends Function>(cb: T, wait = 20) {
let h = 0;
let callable = (...args: any) => {
clearTimeout(h);
h = setTimeout(() => cb(...args), wait);
};
return <T>(<any>callable);
}
@ca0v
ca0v / wildcard.ts
Last active December 28, 2016 05:17
// polyfill for RegExp.escape
if(!RegExp.escape){
RegExp.escape = function(s){
return String(s).replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
};
}
function wildcard(pattern: string) {
let regex = new RegExp(pattern.split("*").map(RegExp.escape).join(".*"));
return (value: string) => {
@ca0v
ca0v / crazy styles
Last active July 31, 2016 22:38
crazy ol3 styles my kids liked
[
{
"star": {
"fill": {
"color": "rgba(123,254,117,0.2733286948332644)"
},
"opacity": 1,
"stroke": {
"color": "rgba(24,47,10,0.9853587034474919)",
"width": 12.115629611976441
export interface Format {
places: number;
digitSeparator: boolean;
dateFormat: string;
}
export interface FieldInfo {
fieldName: string;
label: string;
isEditable: boolean;