Skip to content

Instantly share code, notes, and snippets.

View xychix's full-sized avatar

Mark Bergman (aka xychix) xychix

  • @outflankbv
View GitHub Profile
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
#include <ArduinoOTA.h>
// NOTE: Source code is based on nummerous other projects, it's not my own, neither is it clearly from one other author.
// Considering it GPL would be best I assume.
#define D0 16 //WAKE => 16
#define D1 5 //IOS => 5
#define D2 4 // => 4
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 0
longitude: 0
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
- id: '1544391762473'
alias: termostat OFF 22:30
trigger:
- at: '22:30'
platform: time
condition: []
action:
- alias: ''
data:
payload: '0'
@xychix
xychix / calc.ps1
Last active November 28, 2017 15:37
calc.exe
#!/usr/bin/python
from flask import Flask, abort
import werkzeug.exceptions as ex
from flask import make_response
app = Flask(__name__)
@app.route('/ping')
@app.route('/test1')
@app.route('/')
" vimrc file for following the coding style specified in PEP 7 & 8.
"
" To use this file, source it in your own personal .vimrc file (``source
" <filename>``) or, if you don't have a .vimrc file, you can just symlink to it
" (``ln -s <filename> ~/.vimrc``). All options are protected by 'autocmd's
" (read below for an explanation) so blind sourcing of this file is safe and
" will not affect your settings for non-Python or non-C files.
"
" All setting are protected by 'au' ('autocmd') statements. Only files ending
" in .py or .pyw will trigger the Python settings while files ending in *.c or
source ~/.vimrc_coding
syntax on
set number
set tabstop=4
set shiftwidth=4
try:
import readline
except ImportError:
print "Module readline not available."
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
#! /usr/bin/env python
# Read the output of an Arduino which may be printing sensor output,
# and at the same time, monitor the user's input and send it to the Arduino.
# See also
# http://www.arcfn.com/2009/06/arduino-sheevaplug-cool-hardware.html
import sys, serial, select
from time import sleep
@xychix
xychix / merger.py
Last active August 29, 2015 14:27 — forked from btoews/merger.py
Merging Nessus Files
# file: merger.py
# based off: http://cmikavac.net/2011/07/09/merging-multiple-nessus-scans-python-script/
# by: mastahyeti
import xml.etree.ElementTree as etree
import shutil
import os
first = 1
for fileName in os.listdir("."):