Skip to content

Instantly share code, notes, and snippets.

View intotecho's full-sized avatar

Chris Goodman intotecho

View GitHub Profile
@idkw
idkw / geometry_geojson.yaml
Last active July 18, 2019 15:33 — forked from bubbobne/geometry_geojson.yaml
A swagger geojson geometry description
swagger: '2.0'
info:
version: "1.0.0"
title: GeoJSON geometry
description: An example of swagger file for a geographic API. It contains the geometry definitions
termsOfService: "no"
contact:
name: Daniele Andreis
email: daniele.andreis@gmail.com
url: ""
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jaykilleen
jaykilleen / australian-postcodes.m
Last active December 20, 2018 02:56 — forked from randomecho/australian-postcodes.sql
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
This file has been truncated, but you can view the full file.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
let
Source = Table.FromList(
{
[ID="200",Name="Australian National University",State="ACT",Lat="-35.28",Long="149.12"],
@randomecho
randomecho / australian-postcodes.sql
Last active May 11, 2024 07:46
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;
@shantanuo
shantanuo / mysql_to_big_query.sh
Last active September 14, 2022 07:12
Copy MySQL table to big query. If you need to copy all tables, use the loop given at the end. Exit with error code 3 if blob or text columns are found. The csv files are first copied to google cloud before being imported to big query.
#!/bin/sh
TABLE_SCHEMA=$1
TABLE_NAME=$2
mytime=`date '+%y%m%d%H%M'`
hostname=`hostname | tr 'A-Z' 'a-z'`
file_prefix="trimax$TABLE_NAME$mytime$TABLE_SCHEMA"
bucket_name=$file_prefix
splitat="4000000000"
bulkfiles=200