Skip to content

Instantly share code, notes, and snippets.

@apostoloss
apostoloss / git-aware-bash-prompt.md
Created September 30, 2019 07:58 — forked from eliotsykes/git-aware-bash-prompt.md
Git Aware Bash Prompt
@apostoloss
apostoloss / add-ns.py
Created September 30, 2019 07:57 — forked from deltaroe/add-ns.py
#!/usr/bin/env python
import yaml
import sys
for manifest in yaml.load_all(sys.stdin):
if manifest:
if 'metadata' in manifest and 'namespace' not in manifest['metadata']:
manifest['metadata']['namespace'] = sys.argv[1]
print '---'
@apostoloss
apostoloss / MQTT_ESP8266_temperature_humidity.ino
Created December 1, 2016 12:32 — forked from balloob/MQTT_ESP8266_temperature_humidity.ino
Sketch for the ESP8266 to publish temperature and humidity values received from a DHT22 to MQTT
// Get ESP8266 going with Arduino IDE
// - https://github.com/esp8266/Arduino#installing-with-boards-manager
// Required libraries (sketch -> include library -> manage libraries)
// - PubSubClient by Nick ‘O Leary
// - DHT sensor library by Adafruit
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>