Skip to content

Instantly share code, notes, and snippets.

View jamesfe's full-sized avatar

jimmy jamesfe

  • Seattle, WA
View GitHub Profile
We couldn’t find that file to show.
@jamesfe
jamesfe / profiled_maven_fix.xml
Created July 26, 2017 13:36
maven-exec-plugin build for all devs
<profiles>
<profile>
<id>windows code generation</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<build>
<plugins>
@jamesfe
jamesfe / simple_solution.xml
Last active July 26, 2017 13:33
maven-exec-plugin troubleshooting
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<configuration>
<executable>python3</executable>
<arguments>
<argument>${project.basedir}/generateSources.py</argument>
</arguments>
@jamesfe
jamesfe / geolib.js
Last active July 18, 2017 20:28
bucketing a 50 mile race
/* This was naughty, but I minified the geolib library. It's here and it's awesome though: https://www.npmjs.com/package/geolib */
!function(t,e){"use strict";function i(){}i.TO_RAD=Math.PI/180,i.TO_DEG=180/Math.PI,i.PI_X2=2*Math.PI,i.PI_DIV4=Math.PI/4;var a=Object.create(i.prototype,{version:{value:"2.0.21"},radius:{value:6378137},minLat:{value:-90},maxLat:{value:90},minLon:{value:-180},maxLon:{value:180},sexagesimalPattern:{value:/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,2}))?)'\s*(([0-9]{1,3}(\.([0-9]{1,4}))?)"\s*)?([NEOSW]?)$/},measures:{value:Object.create(Object.prototype,{m:{value:1},km:{value:.001},cm:{value:100},mm:{value:1e3},mi:{value:1/1609.344},sm:{value:1/1852.216},ft:{value:100/30.48},in:{value:100/2.54},yd:{value:1/.9144}})},prototype:{value:i.prototype},extend:{value:function(t,e){for(var i in t)void 0!==a.prototype[i]&&!0!==e||("function"==typeof t[i]&&"function"==typeof t[i].bind?a.prototype[i]=t[i].bind(a):a.prototype[i]=t[i])}}});void 0===Number.prototype.toRad&&(Number.prototype.toRa
@jamesfe
jamesfe / draw_randomly.go
Created July 14, 2016 21:22
Draw a random path on a canvas.
package main
import (
"math/rand"
"os"
"time"
"github.com/ajstarks/svgo"
)
@jamesfe
jamesfe / data_network.json
Created July 12, 2016 14:57
Metro Network
{
"nodes": [
{
"line": "RD",
"name": "Shady Grove - RD",
"unique_id": "RDA15"
},
{
"line": "RD",
"name": "Rockville - RD",
# -*- coding: utf-8 -*-
class X(object):
things = {
'a': 1,
'b': 2,
'c': 3
}
@jamesfe
jamesfe / python_class_behavior.py
Created October 7, 2015 19:01
Python Class Behavior?
class a(object):
def do_something(self):
print("Something from A")
class b(a):
def do_something(self):
print("Something from B (1)")
super(self.__class__, self).do_something()
print("Something from B (2)")