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
@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
@andypiper
andypiper / README.md
Last active September 28, 2015 01:08 — forked from glejeune/READLE.md
A (very) simple chat service using MQTT

Install

  1. Install and run an MQTT broker (mosquitto is a good choice)

  2. Install mqtt and ncurses-ruby gems (the plain ncurses gem is harder to natively compile)

    sudo gem install mqtt ncurses-ruby

Run

@andypiper
andypiper / rainbow_serial.pde
Created February 5, 2012 00:29 — forked from anonymous/rainbow_serial.pde
File to drive Rainbowduino from simple serial interface
/*
Rainbowduino v3.0 Library examples:
Sets pixels on 2D plane (8x8 matrix)
*/
#include <Rainbowduino.h>
uint32_t colorRGB[13] = {0xFFFFFF,0x000000,0xFFFFFF,0x000,0xFF0000,0x00FF00,0x0000FF,0xFF0000,0x00FF00,0x0000FF,0xFF0000,0x00FF00,0x0000FF };
@andypiper
andypiper / Nanode_Tiny_Bas_Temp
Created February 10, 2012 22:16 — forked from anonymous/Nanode_Tiny_Bas_Temp
Nanode Tiny Basic with temperature sensing by @ceejay
// TinyBASIC.cpp : An implementation of TinyBASIC in C
//
// Author : Mike Field - hamster@snap.net.nz
//
// Based on TinyBasic for 68000, by Gordon Brandly
// (see http://members.shaw.ca/gbrandly/68ktinyb.html)
//
// which itself was Derived from Palo Alto Tiny BASIC as
// published in the May 1976 issue of Dr. Dobb's Journal.
//
@andypiper
andypiper / workshop.rb
Last active April 9, 2016 07:36 — forked from brndnblck/workshop.rb
Twitter Ads API Getting Started (Ruby)
# enable "sandbox" mode
CLIENT.options[:sandbox] = true
# load your sandbox account object
account = CLIENT.accounts.first
# create your campaign
campaign = TwitterAds::Campaign.new(account)
campaign.funding_instrument_id = account.funding_instruments.first.id
campaign.daily_budget_amount_local_micro = 1_000_000
@andypiper
andypiper / random_followers.py
Created January 25, 2018 16:45 — forked from aparrish/random_followers.py
random sample of twitter followers for a given screen name
# return a random sample of your twitter followers
# run like so:
# $ python random_followers.py <screen_name>
# where <screen_name> is the account you want followers for
import sys, random, json, urllib
sname = sys.argv[1]
ids_raw = urllib.urlopen(
"https://api.twitter.com/1/followers/ids.json?screen_name="+sname).read()
@andypiper
andypiper / twit_twurl.sh
Last active December 16, 2019 14:06 — forked from shapeshed/twit_twurl.sh
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
@andypiper
andypiper / README.md
Created February 20, 2012 18:01 — forked from bergie/README.md
MQTT pub/sub example

This is a simple example of the MQTT protocol with Node.js. The client code has also been tested with a combination of C++ servers and clients.

@andypiper
andypiper / twitter_collection_examples.py
Created June 19, 2020 15:46 — forked from fratamico/twitter_collection_examples.py
Creating a Twitter Collection via API
import json
from requests_oauthlib import OAuth1Session
# For a blog post describing this process more, see:
# https://medium.com/analytics-vidhya/creating-a-twitter-collection-via-api-1378ecfe20df
api_key = 'your api key'
api_secret_key = 'your api secret key'
access_token = 'your access token'
@andypiper
andypiper / rc2014.md
Created April 12, 2022 21:26 — forked from jblang/rc2014.md
RC2014 Links