Skip to content

Instantly share code, notes, and snippets.

View BrunoCaimar's full-sized avatar

Bruno Caimar BrunoCaimar

View GitHub Profile
@dbouwman
dbouwman / PointClusterService.cs
Created March 24, 2012 21:26
Server Side Clustering Class in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SafeRoutes.Infrastructure.Storage.Domain;
namespace SafeRoutes.Infrastructure.Services
{
/// <summary>
/// Service that clusters ProjectPoints
@sgillies
sgillies / geo_interface.rst
Last active March 4, 2025 10:09
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

@asmallteapot
asmallteapot / gist:2368038
Created April 12, 2012 15:14
Notes from @UncleBobMartin’s Demanding Professionalism talk in Tampa, Florida on 11 April 2012.

Demanding software professionalism

Presented by Bob Martin in Tampa, Florida on 11 April 2012.

Miscellany

β€œUranus is not a naked–eye object under any circumstances.”

  • Copernicus’ motivation was religious, not scientific! Galileo looked at the phases of Venus to determine its orbit in relation to Sol.

Bob: How do you become unafraid of your code?

@unclebob
unclebob / apology.
Created April 27, 2012 12:19
Apology to Women Programmers.
Today I gave a keynote at ACCU in Oxford. In the midst of it I made two (count them) two statements that I should have known better than to make. I was describing the late '70s, and the way we felt about the C language at the time. My slide said something like: "C was for real men." Emily Bache, whom I know and hold in high regard, spoke up and said "What about women?". And I said something like: "We didn't allow women in those days." It was a dumb crack, and should either not have been said, or should have been followed up with a statement to the effect that that was wrong headed.
The second mistake I made was while describing Cobol. I mentioned Adm. Grace Hopper. I said something like "May she rest in peace." I don't know that any of the words were actually demeaning, but the tone was not as respectful as it should have been to an Admiral in the United State Navy, and one who was so instrumental in our industry; despite what I feel about Cobol.
I am a 59 year old programmer who was brought up
@avesse
avesse / Log4NetSoapExtension.cs
Created July 7, 2012 00:34
Log4NetSoapExtension
public class Log4NetSoapExtension : SoapExtension
{
private static readonly ILog logger = LogManager.GetLogger("My Service");
Stream oldStream;
Stream newStream;
public override Stream ChainStream(Stream stream)
{
oldStream = stream;
@akimboyko
akimboyko / gist:4530162
Created January 14, 2013 13:48
How to intercept method with custom attribute using DynamicProxy
void Main()
{
ProxyGenerator proxyGenerator = CreateProxyGenerator();
IService proxy =
proxyGenerator
.CreateInterfaceProxyWithTargetInterface(new Service() as IService, new TracingInterceptorAspect());
proxy.ProcessRequest();
@s4nchez
s4nchez / gist:4713057
Last active March 7, 2022 01:22
Command line tools every developer should know

Command line tools every developer should know

Prior reading

  • The Unix philosophy, specially the "Make each program do one thing well" [1]

Basic

  • File and directory navigation/manipulation (ls, cd, mkdir, rm, rmdir, touch, cp, mv)
  • ln/unlink/readlink
@oevans
oevans / REST_API_calls.py
Last active July 22, 2024 19:35
Examples: making standard calls to the ArcGIS Online/Portal REST API via python
'''
NOTES:
- See the ArcGIS REST API documentation for supported operations, methods, and syntax:
http://resources.arcgis.com/en/help/arcgis-rest-api/
- A TOKEN must be passed as parameter in addition to any required inputs for the operation.
- "urllib.urlencode" handles spaces and other special characters in parameters so that valid URLs are constructed.
- "urllib.urlopen" sends the reqest and handles the response.
- Parameters are appended to URL for GET (see Example 1), but passed to "urlopen" for POST (see Example 2). API docs specifiy supported methods for each operation.
- "json.loads" converts string responses to parseable JSON objects.
@dan-blanchard
dan-blanchard / .1.miniconda.md
Last active December 11, 2019 22:38
Quicker Travis builds that rely on numpy and scipy using Miniconda

For ETS's SKLL project, we found out the hard way that Travis-CI's support for numpy and scipy is pretty abysmal. There are pre-installed versions of numpy for some versions of Python, but those are seriously out of date, and scipy is not there are at all. The two most popular approaches for working around this are to (1) build everything from scratch, or (2) use apt-get to install more recent (but still out of date) versions of numpy and scipy. Both of these approaches lead to longer build times, and with the second approach, you still don't have the most recent versions of anything. To circumvent these issues, we've switched to using Miniconda (Anaconda's lightweight cousin) to install everything.

A template for installing a simple Python package that relies on numpy and scipy using Miniconda is provided below. Since it's a common s

@rxaviers
rxaviers / gist:7360908
Last active April 25, 2025 22:17
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: