Skip to content

Instantly share code, notes, and snippets.

View stevenvandervalk's full-sized avatar

Steve Vandervalk stevenvandervalk

View GitHub Profile
#!/bin/bash
#
# Requires:
# - gdal_sieve.py
# - ogr2ogr (GDAL)
# - topojson (node.js)
# Grab the relative directory for source file.
SRC_DIR=`dirname $0`

Bulk-uploading images taken outside Mapillary apps

Prepare the data

Copy the images from your Action Cam into a folder structure where every folder contains the images that will form one sequence (taken in consequtive 2s intervals)

tree  ~/Downloads/colombia 
/Users/peterneubauer/Downloads/colombia

└── 01

@jennybc
jennybc / 2014-12-01_finessing-excel-line-endings.md
Last active November 17, 2022 13:04
Finessing Excel's stupid line endings

Finessing Excel's stupid line endings

I am sheepish to admit a certain type of routine Microsoft Excel use.

Current example: I am marking for STAT 545. I use R to create a comma delimited marking sheet, by joining the official class list and peer reviews. The sheet contains variables, initially set to NA, where the TAs and I enter official marks and optional comments.

This is where Excel comes in. I like its visual organization of this comma delimited file much more than, say, using a plain text editor. I use the ability to hide columns, resize columns, wrap text, and (gasp!) even fill rows with grey to indicate I am done.

I keep saving the file as comma delimited and I put up with Excel's incessant freak out about "losing features". This is not a one time thing. I need to save and commit this file many times before it is considered done.

@acolyer
acolyer / service-checklist.md
Last active June 20, 2024 08:47
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@andystanton
andystanton / ghost2jekyll.py
Last active July 30, 2017 16:15
Ghost2Jekyll: Converts ghost 0.4.2 sqlite db posts to jekyll 2.3.0 markdown posts.
#!/usr/bin/env python3
# This script is provided to show how I migrated from Ghost 0.4.2
# to Jekyll 2.3.0 and is used at your own risk. Back up your blog
# before trying it out.
def getPostTemplate():
with open('post-template.md', 'r') as f:
posttemplate = f.read()
f.closed
#!/bin/bash -x
#===============================================================================
#
# FILE: percona-xtrabackup.sh
#
# USAGE: ./percona-xtrabackup.sh
#
# DESCRIPTION: Forked from https://gist.github.com/jaygooby/5208373
#
# OPTIONS: ---
@panuta
panuta / gist:1852087
Last active June 16, 2024 18:15
How to setup Django/Postgresql on OS X Mountain Lion using Homebrew

Command Line Tools for Xcode

Command line tools comes bundle with Xcode prior to 4.3 version. After 4.3, you need to install a separated command line tools yourself.

First, go to this url and login using Apple Developer account (Free to register)

https://developer.apple.com/downloads/index.action
@stefanfoulis
stefanfoulis / osx_developer_installation.rst
Last active June 17, 2024 17:46
Instructions on how to setup an OSX developer machine for (python/django) development

OSX Developer System installation

This guide assumes a fresh install of Mac OSX 10.7 Lion.

Brew User

@dkaz
dkaz / worst-indexes.sql
Created October 19, 2010 21:56
Find the worst performing indexes in MySQL server
/*
SQL script to grab the worst performing indexes
in the whole server
*/
SELECT
t.TABLE_SCHEMA AS `db`
, t.TABLE_NAME AS `table`
, s.INDEX_NAME AS `inde name`
, s.COLUMN_NAME AS `field name`
, s.SEQ_IN_INDEX `seq in index`