Skip to content

Instantly share code, notes, and snippets.

View dgtal's full-sized avatar

deadmau5 dgtal

  • -
View GitHub Profile
@dgtal
dgtal / speech.swift
Last active November 7, 2017 19:13 — forked from bellbind/speech.swift
[osx][swift]Example of Text-to-Speech as commandline program
// Text-to-Speech on OSX
// run: swift speech.swift "東京特許許可局"
// build: xcrun -sdk macosx swiftc speech.swift && ./speech "東京特許許可局"
//
// for OSX, use NSSpeechSYnthesizer in AppKit,
// (for iOS, use AVSpeechSynthesizer in AVFoundation)
//
// 11/9/2016 -- Swift 3.0
import Foundation
@dgtal
dgtal / geocode.php
Created October 21, 2016 13:38 — forked from chrisveness/geocode.php
Geocode an address using Google API
<?php
/**
* Geocodes an address using Google API (limit 2500/day).
*
* @param string $address - Address to be geocoded.
* @param string [$region=gb] - Region results are to biased to.
* @return object {lat, lon, status, address}.
*/
function geocode($address, $region='gb')