Skip to content

Instantly share code, notes, and snippets.

@jqtrde
jqtrde / opml_2011
Created October 30, 2011 19:43
OPML List - October 2011 (pre-pruning)
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Jacques subscriptions in Google Reader</title>
</head>
<body>
<outline title="Football" text="Football">
<outline text="11 tegen 11" title="11 tegen 11" type="rss"
xmlUrl="http://11tegen11.wordpress.com/feed/" htmlUrl="http://11tegen11.wordpress.com"/>
<outline text="A Beautiful Numbers Game"
@jqtrde
jqtrde / README.markdown
Created May 5, 2012 16:45
exports vs. module.exports in Node

Exports vs. Module.exports

Exports is a helper that actually points to Module.exports. Exports is the recommended way to go, unless you need to chance the Object type of Module.exports. So generally:

Bad: Module.exports = {} Good: Exports.name = function(){}

@jqtrde
jqtrde / js-async.js
Created July 4, 2012 17:08
Async/Sync JS example
var fs = require('fs')
// So, callbacks. When readFile is complete, the callback is 'called'
// And we get our console.log without blocking whatever might be next.
var file = fs.readFile('./example', 'utf-8', function(err, contents){
if (err)
console.log('You iz dumb');
else
console.log(file);
});
@jqtrde
jqtrde / 1-baseline.markdown
Last active December 10, 2015 22:29
Rough notes from the DSRRN 2013 Science Meeting

Setting the baseline: the historial decline of diadromous fish and ecological connections lost.

Productive capactity

  • Exosystems have heterogenity in energy production.
  • Area around the Bay of Fundi is particularly productive.

Migrations

  • ATS, River herring, American eel, Sturgeon.
  • Getting a better understanding of fish movement and migration patterns.
@jqtrde
jqtrde / js-constructors.js
Last active December 14, 2015 07:19
The worst piece on constructors you'll ever read.
// Javascript constructors!
// A constructor is just a plain old function that's invoked with the `new`
// operator, and which produces a specialized object. Useful when you have
// many similar objects.
// Here, `Person` is a constructor.
function Person(name, nickname, age) {
this.name = name;
this.nickname = nickname;
this.age = age;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jqtrde
jqtrde / data.csv
Last active December 20, 2015 23:18
HOWTO: Convert your CSV's to a reprojected GeoJSON with leaving the terminal.
long lat
594162 4932451
@jqtrde
jqtrde / readme.markdown
Last active December 21, 2015 01:08
Testing if ZSH parameters exist with IF & ELSE.

I was looking for a way to simplify the following process:

  1. Have a CSV projected in EPSG:26919
  2. Convert it to a GeoJSON
  3. Reproject that GeoJSON to EPSG:4326

It's a very common pattern, and I don't like retyping it. These are the 'solutions' to that problem.