Skip to content

Instantly share code, notes, and snippets.

View underbluewaters's full-sized avatar
🐟

Chad Burt underbluewaters

🐟
View GitHub Profile
@underbluewaters
underbluewaters / gist:9217216
Last active August 29, 2015 13:56
Mapbox code review
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.1/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.1/mapbox.css' rel='stylesheet' />
<style>
@underbluewaters
underbluewaters / gist:9005346
Last active August 29, 2015 13:56
PHP geojson service psuedocode
<?php
# Connect to MySQL database
$conn = new PDO('mysql:host=localhost;dbname=mydatabase','myusername','mypassword');
# Build SQL SELECT statement
$sql = 'SELECT * FROM horrible_stuff_happening_in_syria';
# Try query or error
$rs = $conn->query($sql);
@underbluewaters
underbluewaters / SMS.coffee
Created December 31, 2013 21:50
How to send an SNS notification to my phone
# Must have AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set as env vars
AWS = require('aws-sdk')
sns = new AWS.SNS({region: 'us-east-1'})
sns.publish {
Message: "Time for 2oz Cascade Hops addition",
TopicArn: "arn:aws:sns:us-east-1:134826063113:Homebrew"
}, (err, data) ->
console.log(err, data)
@underbluewaters
underbluewaters / env.coffee
Created November 5, 2012 21:39
webspecter -- Trouble getting wait() to accept timeout option
exports.config =
baseUrl: 'http://localhost:3137'
exports.selectors = {}
exports.helpers =
appReady: (done) ->
browser = @browser
ready = () -> browser.evaluate(() -> window.app.initialized)
ready.message = "Timed out waiting for the app to be ready"