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 | |
# create and delete maintenance | |
set -e | |
GENIEKEY=YourOpsGenieKey | |
INTEGRATION_ID=YourIntegrationId | |
MAINTENANCE_DESCRIPTION="RepositorySyncronization" | |
# OpsGenie expects a format like yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2017-01-15T08:00:00+02:00) |
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 | |
aws ec2 describe-instances --region eu-west-1 --filter Name=tag:Name,Values=InstanceName --query 'Reservations[].Instances[].PrivateIpAddress' --output text | xargs -I {} gnome-terminal -x ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ~/my_keys/my-private-key.pem -o IdentitiesOnly=yes cloud-user@{} |
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
#include <ESP8266WiFi.h> | |
#include <ESP8266WiFiMulti.h> | |
#include <WiFiUdp.h> | |
#include <Wire.h> | |
#include <Adafruit_Sensor.h> | |
#include <DHT_U.h> | |
#include <Adafruit_BMP085.h> | |
#include <ntp.h> | |
#include <TimeLib.h> | |
#include <ACROBOTIC_SSD1306.h> |
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
FROM alpine:3.14 | |
ENV AWSCLI_VERSION "1.20.7" | |
RUN apk add --update \ | |
python3 \ | |
python3-dev \ | |
py-pip \ | |
build-base \ | |
&& pip install awscli==$AWSCLI_VERSION --upgrade --user \ |
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
FROM golang:1.8 | |
WORKDIR /go/src/app | |
COPY . . | |
RUN go-wrapper download && go-wrapper install | |
EXPOSE 9116 | |
CMD ["go-wrapper", "run"] # ["app"] |
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
#!/usr/local/bin/python | |
import RPi.GPIO as GPIO | |
import time | |
import dht11 | |
import graphitesend | |
#define the pin that goes to the circuit | |
pin_for_temp = 15 | |
pin_for_light = 40 |
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
FROM ubuntu:16.04 | |
MAINTAINER Florian Dehn <flo@katzefudder.de> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu/ xenial multiverse" >> /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y python-pip openssh-client | |
RUN pip install --upgrade pip |
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 | |
HOST=sub.host.domain | |
PORT=2003 | |
echo "$1 $2 `date +%s`"|nc $HOST $PORT |
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 | |
HOST=sub.host.domain | |
PORT=8125 | |
METHOD=$1 | |
KEY=$2 | |
VALUE=$3 | |
echo "$KEY:$VALUE|$METHOD"|nc -u -w 1 $HOST $PORT |