This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import yaml | |
from influxdb_client import InfluxDBClient, Point | |
import logging | |
from logging.handlers import RotatingFileHandler | |
from datetime import datetime | |
# imports for surepy | |
import asyncio | |
from typing import List |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Xna.Framework; | |
using Terraria; | |
using Terraria.ID; | |
using Terraria.ModLoader; | |
namespace DrewsSword.Items | |
{ | |
public class DrewSword : ModItem | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set analogPin to the input pin | |
int inputAnalogPin = 0; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(inputAnalogPin, INPUT); | |
Serial.begin(9600); | |
} | |
void loop() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ecobee | |
from influxdb import InfluxDBClient | |
def logPoint(sensorName=None, sensorValue=None, sensorType=None): | |
return { | |
"measurement": sensorType, | |
"tags": { | |
"sensor": sensorName | |
}, | |
"fields": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import forecastio | |
from influxdb import InfluxDBClient | |
client = InfluxDBClient(host='YOUR_IP', | |
port=8086, | |
database='YOURDB', | |
username='username', | |
password='password', | |
verify_ssl=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to reduce bandwidth rate and create network delay and packet loss on linux interfaces | |
# Can be placed on one interface (one server) or both interfaces (both servers). | |
# | |
# Simply run ./tc-con start to start it | |
# and ./tc-con stop to stop it. | |
# Run ./tc-con status to see if it's running. | |
# | |
# tc uses the following units when passed as a parameter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
# | |
# Color log4j-style logs for easier visual parsing. | |
# | |
# Usage: | |
# tail foo.log | log-color | |
# run-service | log-color | |
export TERM=xterm-256color |