Skip to content

Instantly share code, notes, and snippets.

@3ng1n33r
3ng1n33r / transmitter.ino
Created June 11, 2016 14:48
CAME TOP 432 NA (433MHz) transmitter code
#define transmitPin 0 // RF transmit pin
#define ledPin 1
const int signalSize = 13;
/*
2 5 LH 2
2 5 LH 2
2 2 LL 1
5 2 HL 3
@3ng1n33r
3ng1n33r / ntp.conf
Last active February 25, 2018 12:29
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
@3ng1n33r
3ng1n33r / config.json
Created July 3, 2018 17:05
Attempt to get temperature from Withings Smart Body Analyser (Now sold as Nokia Body+) to be displayed within Homekit. Ended up giving up as it appears the temperature information is only updated when you step on the scale, which kind of defeats the purpose.
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 52430,
"pin": "031-45-154"
},
"description": "Config file",
@3ng1n33r
3ng1n33r / gist:55634867ba8ac22d6df3a070d8ccb31d
Created July 5, 2019 07:02
convert disk image with qemu to esxi6 compatible format
#
qemu-img info <filename.ova>
image: <filename.ova>
file format: raw
virtual size: 1.4G (1501966848 bytes)
disk size: 1.4G
#
qemu-img convert -p -f raw -O vmdk -o adapter_type=lsilogic,subformat=streamOptimized,compat6 <filename.ova> <filename.vmdk>
(100.00/100%)
@3ng1n33r
3ng1n33r / Dockerfile
Last active March 4, 2020 07:57
Streamlink docker container to serve stream data through HTTP from youtube, twich, etc.
FROM python:3-alpine
RUN apk add gcc musl-dev --no-cache \
&& pip3 install --no-cache-dir streamlink \
&& apk del gcc musl-dev --no-cache \
&& rm -Rf /tmp/*
EXPOSE 8081
ENTRYPOINT ["streamlink", \
@3ng1n33r
3ng1n33r / Dockerfile
Last active March 4, 2020 08:07
Serve stream with VLC from HTTP source
FROM alpine:3.8
RUN set -xe \
&& apk add --no-cache vlc
RUN addgroup -g 2000 vlc \
&& adduser -D -u 2001 -G vlc vlc
EXPOSE 8082
@3ng1n33r
3ng1n33r / dashboard.json
Created November 14, 2019 11:50
Grafana dashboard for docker PhotonOS InfluxDB
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@3ng1n33r
3ng1n33r / docker-compose.yaml
Created June 3, 2020 04:41
Zabbix 5.0 docker compose (with mysql database support)
version: '3.5'
services:
zabbix-server:
image: zabbix/zabbix-server-mysql:alpine-5.0-latest
container_name: zabbix-server
ports:
- "10051:10051"
networks:
zabbix_network:
ipv4_address: 172.18.0.5

Keybase proof

I hereby claim:

  • I am 3ng1n33r on github.
  • I am 3ng1n33r (https://keybase.io/3ng1n33r) on keybase.
  • I have a public key ASCWEqGAcEqJpjLnHMvV_-mRO16UZNJLCEFQfYSoQLfqqQo

To claim this, I am signing this object:

import requests
import re
import fileinput
import time
from bs4 import BeautifulSoup
from datetime import datetime
def timestamp():
now = datetime.now()
ts = now.strftime("%Y-%m-%d %H:%M:%S")