Skip to content

Instantly share code, notes, and snippets.

View andypiper's full-sized avatar
🔨
Fixing code things with finger hammers.

Andy Piper andypiper

🔨
Fixing code things with finger hammers.
View GitHub Profile
@shapeshed
shapeshed / twit_twurl.sh
Created June 4, 2010 12:21
Tweet from the command line using twurl & OAuth
################################
#!/usr/bin/env bash
# File: twit_twurl.sh
# Description: Tweet from the command line using twurl & OAuth
#
# Copyright 2010 George Ornbo (Shape Shed)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@gnip
gnip / Twitter Premium Sample Payload with Geo Info - JSON Activity Streams format.js
Created January 3, 2011 21:16
This is a sample payload for Gnip's premium feeds from Twitter in JSON Activity Streams format.
{
"verb": "post",
"location": {
"country_code": "United States",
"displayName": "Downtown, Boulder",
"objectType": "place",
"geo": {
"coordinates": [
[
[
@gnip
gnip / Twitter (JSON Activity Streams format).js
Created January 4, 2011 00:53
Twitter Sample Payload in JSON Activity Streams format
{
"verb": "post",
"postedTime": "2010-10-21T16:02:46+00:00",
"body": "what we've been up to at @gnip -- delivering data to happy customers http://gnip.com/success_stories",
"actor": {
"location": {
"displayName": "Boulder, CO",
"objectType": "place"
},
"postedTime": "2008-10-24T23:22:09+00:00",
@getfatday
getfatday / Lorem Ipsum Tweet
Created March 3, 2011 20:03
140 characters of Lorem Ipsum for Twitter
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque interdum rutrum sodales. Nullam mattis fermentum libero, non volutpat.
@jugyo
jugyo / keyword.rb
Created April 2, 2011 13:50
keyword
# keyword plugin
# ====
#
# config example:
#
# Earthquake.config[:keyword] = {
# :pattern => /ruby|rails|earthquake/i,
# :ignore => %w(jugyo yukihiro_matz),
# :filter => true,
# :notify => true
@knolleary
knolleary / MQTTBridge.pde
Created April 3, 2011 22:29
CurrentCost MQTT Bridge
/*
CurrentCost MQTT Bridge
Example sketch for the CurrentCost Bridge device that causes
readings to be published over MQTT.
Requires:
- Arduino 0022
- PubSubClient v1.6+
http://knolleary.net/arduino-client-for-mqtt/
@derekcollison
derekcollison / Cloud Foundry Production Updates
Created April 16, 2011 17:11
How to update your application in Cloud Foundry without dropping user requests..
# vmc update is great for test and development, however it stops your old app and stages and starts the new one,
# resulting in dropped requests.
# If you want to update an application without dropping user requests, see below.
# NOTE: This change assumes your application can share services, etc with the new version.
# Assume my app is named foo
vmc push foo-v2 --url foov2.cloudfoundry.com
@fxn
fxn / post.md
Created May 23, 2011 21:08
GeoPlanet data with ancestor chain cache imported in 10 minutes

GeoPlanet data with ancestor chain cache imported in 10 minutes

Yahoo! provides its GeoPlanet data as three separate TSV files, available for download here.

That's a database with some 17 million records:

  • 5.7 million records: locations (aka places).
  • 2.2 million records: alternative names for each place (aka aliases).
  • 9.6 million records: matrix of neighbourhoods per place (aka adjacencies).
@andypiper
andypiper / GameDuino_HelloWorld.c
Created June 17, 2011 15:20 — forked from biomood/GameDuino_HelloWorld.c
Hello World for the Gameduino
#include <SPI.h>
#include <GD.h>
void setup() {
// give time for the gameduino splash screen to be displayed
delay(2500);
GD.begin();
// load character set
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>