Skip to content

Instantly share code, notes, and snippets.

View andypiper's full-sized avatar
🧳
Gearing up for FOSDEM.

Andy Piper andypiper

🧳
Gearing up for FOSDEM.
View GitHub Profile
@andypiper
andypiper / webfinger
Last active March 18, 2024 23:01 — forked from AaronNGray/webfinger
#!/bin/bash
# webfinger (macOS)
# needs GNU getopt since macOS doesn't support relevant options
# and jq - use `brew install gnu-getopt jq`
if [ ! `which jq` ]
then
echo Installing 'jq'
brew install jq
fi
@andypiper
andypiper / post
Created January 2, 2023 19:32 — forked from edsu/post
#!/bin/bash
# Set these environment variables and you can create a (text-only) post using
# your favorite command line text editor.
#
# - EDITOR: e.g. vim, emacs, etc
# - MASTODON_POST_HOST: the hostname for our Mastodon account, e.g. chaos.social
# - MASTODON_POST_TOKEN: an app access key with write:statuses permission
#
# See: https://gist.github.com/edsu/aa6f70bb20127b1e18e05dff5e470022
@andypiper
andypiper / rc2014.md
Created April 12, 2022 21:26 — forked from jblang/rc2014.md
RC2014 Links
@andypiper
andypiper / temp-check.py
Created March 21, 2022 14:18 — forked from lesp/temp-check.py
Using a BME688 Temperature sensor with Pimoroni's Badger 2040. Code is based on the BME688 example, but with added Badger 2040 code.
"""BME688 / BME680 demo
This demo will work for both the BME680 and BME688.
"""
import time
from breakout_bme68x import BreakoutBME68X, STATUS_HEATER_STABLE
from pimoroni_i2c import PimoroniI2C
import badger2040
import machine
badger = badger2040.Badger2040()
@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 / 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 / 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 / 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 / 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 / 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