Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <errno.h>
#include <sys/mman.h>
#include <sys/time.h>
[{"id":"77dc6f46.c37374","type":"s7 in","z":"50400dad.c86cdc","endpoint":"f11e954c.c565d8","mode":"all","variable":"","diff":true,"name":"S7-Test","x":88.71646118164062,"y":222.0645294189453,"wires":[["9e039622.0e6298","fd4635eb.4a05d8","52918c0a.bb3f04"]]},{"id":"fd4635eb.4a05d8","type":"file","z":"50400dad.c86cdc","name":"S7-Output","filename":"/home/files/output","appendNewline":true,"createDir":true,"overwriteFile":"false","x":310.6526336669922,"y":263.7500982284546,"wires":[]},{"id":"81df2f42.ff676","type":"OpcUa-Client","z":"50400dad.c86cdc","endpoint":"9cf46fa8.3545a","action":"subscribe","time":"1","timeUnit":"s","name":"Subscribe Temperatur","x":386.6300048828125,"y":356.5799865722656,"wires":[["96439082.9297"]]},{"id":"3f9b511a.c27d1a","type":"inject","z":"50400dad.c86cdc","name":"Inject Temperature","topic":"ns=3;s=\"OPC_UA_DB\".\"Temperature\"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":137.2936248779297,"y":356.03271484375,"wires":[["81df2f42.ff676"]]},{"id":"96439
[{"id":"dc7095e8.9a33d8","type":"tab","label":"Load config"},{"id":"e0eb21a2.82121","type":"tab","label":"BACnet/IP interface"},{"id":"5b01eb4c.5e5e24","type":"tab","label":"Timeouts"},{"id":"9d3d1941.54a568","type":"tab","label":"Examples"},{"id":"dfcb3b42.515a08","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"37f1f19a.7d3d5e","type":"udp in","z":"e0eb21a2.82121","name":"BACnet/IP_In","iface":"","port":"47808","ipv":"udp4","multicast":"false","group":"","datatype":"buffer","x":206.69832611083984,"y":694.1349201202393,"wires":[["bca8c5bc.a38bb8","56afe7a8.8ba808"]]},{"id":"f505dd40.a2ecb","type":"debug","z":"e0eb21a2.82121","name":"UDP data to send","active":false,"console":"false","complete":"true","x":1010.8809814453125,"y":342.36512756347656,"wires":[]},{"id":"8f910e9d.bd567","type":"function","z":"e0eb21a2
@popk
popk / cltools.sh
Created August 30, 2017 05:14 — forked from justinbellamy/cltools.sh
Install Autoconf and Automake on OS X El Capitan
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
@popk
popk / Bench.hs
Created August 24, 2017 15:02 — forked from thumphries/Bench.hs
Demonstration of SIMD performance gap
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as B8
import Criterion.Main
import Criterion.Types (Config (..))
import qualified Mystery
@popk
popk / gist:01819124aa0cea9af676728dc7bb30a2
Created August 16, 2017 00:31 — forked from kamenitxan/gist:11008488
rrd databáze na teploty
#!/usr/bin/bash
#
# DigiTemp v2.1 RRDB database Creation
rrdtool create digitemp.rrd DS:temp:GAUGE:600:U:U DS:hum:GAUGE:600:U:U DS:int1:GAUGE:600:U:U DS:int2:GAUGE:600:U:U DS:int3:GAUGE:600:U:U RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797
@popk
popk / gist:f2580b140fe173caf08764be4a6e39c5
Created August 16, 2017 00:30 — forked from anonymous/gist:11007920
RRDtool temperature graphs
#!/bin/bash
# DigiTemp RRD grafing script
reading=`digitemp_DS9097 -a -q -o2 | gawk '{print $2}' | grep -E '^-?[0-9]*\.?[0-9]*$'`
rrdtool update /tmp/temp/digitemp.rrd N:$reading:nan:nan:nan:nan
echo teplota $reading >> /tmp/temp/templog.txt
echo $reading
@popk
popk / iterm2-solarized.md
Created July 11, 2017 17:13 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@popk
popk / eternalblue8_exploit.py
Created May 19, 2017 01:00 — forked from worawit/eternalblue8_exploit.py
Eternalblue exploit for Windows 8/2012
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit for Windows 8 and 2012 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@popk
popk / InternetOpenUrlA.py
Created May 15, 2017 23:30 — forked from anonymous/InternetOpenUrlA.py
Wannacrypt proxy use checker
#!/usr/bin/env python3
import sys
import ctypes
target_url = sys.argv[1]
buffer_url = ctypes.c_char_p(bytes(target_url,"ascii"))
print("{:20s} : {}".format("Input URL object",buffer_url))