Skip to content

Instantly share code, notes, and snippets.

View todrobbins's full-sized avatar
⌨️
beep boop

Tod Robbins todrobbins

⌨️
beep boop
View GitHub Profile
@nichtich
nichtich / LivingMyLife.ttl
Created November 1, 2011 21:33
Simplified Ontology for Bibliographic Resources (sobr)
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix daia: <http://purl.org/ontology/daia/> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix frbr: <http://purl.org/vocab/frbr/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix sobr: <http://example.org/sobr/> . # NO URI NAMESPACE YET
# Emma Goldman's biography
<http://www.librarything.com/work/70394>
@angrytoast
angrytoast / firecatwiki.js
Created February 5, 2012 05:21
Category suggestion for Wikipeda
/*This function adds a jQuery include, this adds the latest version, instead of the version on wikipedia, which is outdated */
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active June 14, 2024 17:42
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com).

Contents

@tmcw
tmcw / README.md
Created October 31, 2012 15:00
GIS with Python, Shapely, and Fiona Example 1 - CSV Files
@ktym
ktym / unwebarchive.rb
Created February 12, 2013 18:03
Extract contents of a .webarchive file.
#!/usr/bin/env ruby
#
# Mac OS X webarchive is a binary format of a plist file. You can extract the contents manually:
# 1. convert the plist file into XML by "plutil -convert xml1 file.webarchive"
# 2. parse the resulted XML file by some XML parser
# 3. decode "WebResourceData" by Base64.decode64(data) in each key
# 4. save the decoded content into a file indicated by "WebResourceData"
# Thankfully, the plist library can take care of annoying steps 2 and 3.
#
# Preparation:
@bencrowder
bencrowder / splitimage.sh
Last active January 27, 2019 18:28
Shell script to split two-spread image into two different images. Uses ImageMagick.
#!/bin/sh
# Split two-spread image into two different images (leaving some overlap for safety)
# Usage: splitimage filename.jpg
# ----------------------------------------------------------------------------------
convert $1 -crop 56x100%+0+0 +repage output/`basename $1 .jpg`a.jpg
convert $1 -flop -crop 60x100%+0+0 -flop +repage output/`basename $1 .jpg`b.jpg
@benbalter
benbalter / geojson-conversion.sh
Last active April 23, 2024 13:16
Bulk convert shapefiles to geojson using ogr2ogr
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
@veltman
veltman / gist:6186441
Last active December 20, 2015 19:49
Bookmarklet, when executed on a google search results page it will cycle through everything in search_terms[] and record the suggestions to a big JSON object. After it cycles through all the terms, it will replace the document HTML with the stringified JSON. Minify it before using it.
(function(){
//get jQuery
if (window.jQuery === undefined) {
var done = false;
var script = document.createElement("script");
script.src = "http:////ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js";
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
done = true;
@ubershmekel
ubershmekel / json_history_to_kml.py
Last active June 19, 2024 07:35
Convert LocationHistory.json from Google takeout of location history (latitude) to a usable KML file for viewing in Google Earth.
"""
Convert LocationHistory.json from Google takeout of location history (latitude)
to a usable KML file for viewing in Google Earth.
Usage:
python json_history_to_kml.py LocationHistory.json

Why You Should Not Use The ODbL for Your New Project

The ODbL is a license written for OpenStreetMap. Like a lot of other open licenses, it's not tried in court.

It's a 'sharealike' license: the main important provision is that combining ODbL data with other data requires the combined product to be licensed under the ODbL. In this way it's quite a bit more like the GPL and other old-fashioned open source licenses than MIT or BSD, and much less a license like Public Domain.

Why shouldn't you use ODbL for your project?

The sharealike provision is overly broad and has destructive consequences for potential large users: using derived works from an ODbL database, like geoocoding, routes, images, and so on, could make the entire new work under the ODbL. So, for instance, if you had a restaurant rating site, and you integrate geocoded locations into it from OSM, your entire database, including user data and reviews, may have to be 'opened'.