Skip to content

Instantly share code, notes, and snippets.

View thomasbrueggemann's full-sized avatar
👨‍💻

Thomas Brüggemann thomasbrueggemann

👨‍💻
View GitHub Profile
#include "Wire.h"
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
const int MPU_ADDR = 0x68; // I2C address of the MPU-6050
const int MOVING_DELTA_THRESHOLD = 1000;
const int ALARM_PENALTY_MILLIS = 60000;
const char* WIFI_SSID = "Rumblebuff"; // The SSID (name) of the Wi-Fi network you want to connect to
const char* WIFI_PASSWORD = "7696298557852265"; // The password of the Wi-Fi network
#define NUM_LEDS 6
#define OFF 0
#define ON 1
int PINS[] = {5, 4, 0, 2, 14, 12};
void setup() {
Serial.begin(115200);
for(int i = 0; i < NUM_LEDS; i++) {
#include <FastLED.h>
#define LED_PIN 5
#define NUM_LEDS 30
#define ANIMATION_FRAME_TIME 80
CRGB leds[NUM_LEDS];
int counter = 0;
void setup() {
@thomasbrueggemann
thomasbrueggemann / temp.ino
Created August 24, 2018 21:43
Wemos D1 mini Pro with SHT3x Temperature sensor to ThingSpeak
#include <WEMOS_SHT3X.h>
SHT3X sht30(0x45);
// Wifi and ThingSpeak settings
#include <ESP8266WiFi.h>
const char* ssid = "";
const char* password = "";
const char* server = "api.thingspeak.com";
export default (genFunc) => {
let next = null;
do {
next = genFunc.next();
} while (!next.done);
return next.value;
};
git tag -l | xargs -n 1 git push --delete origin
String.prototype.trunc = String.prototype.trunc || function(n){
return (this.length > n) ? this.substr(0, n-1) + '&hellip;' : this;
};
console.log("".trunc(50));

Peach (peach.cool) API Endpoints

Peach is hot right now so I poked around their API using https://mitmproxy.org/

As of the last update, this seems to be a fairly extensive/complete list of v1 endpoints, but feel free to submit revisions to this gist with any others you find!

Login

@thomasbrueggemann
thomasbrueggemann / MongoDBCurrentProgress.js
Last active October 21, 2015 08:56
Lists all current operations that have progress information available
db.currentOp().inprog.forEach(
function(op) {
if(op.progress) printjson(op.msg);
}
)
@thomasbrueggemann
thomasbrueggemann / pg
Created April 10, 2015 18:04
Adds a timestamp to every phonegap command in order to track when it was executed, e.g. "$ pg build ios"
#!/bin/bash
echo $(date +%F_%T)
phonegap "$@"