Skip to content

Instantly share code, notes, and snippets.

View ddewaele's full-sized avatar

Davy De Waele ddewaele

View GitHub Profile
@ddewaele
ddewaele / index.js
Created October 7, 2023 18:27
NodeJS MQTT Proxy
const mqtt = require('mqtt');
const fs = require('fs');
// Source broker details
const sourceBrokerUrl = "mqtts://somebroker.com";
const sourceOptions = {
port: 8883,
ca: [fs.readFileSync('/home/ubuntu/keys/server/server.crt')],
key: fs.readFileSync('/home/ubuntu/keys/client.key'),
cert: fs.readFileSync('/home/ubuntu/keys/client.crt'),
@ddewaele
ddewaele / adafruit-config.txt
Created April 25, 2018 12:48
AdaFruit BLE Friend
ATI
BLEFRIEND32
nRF51822 QFACA10
33BB824D91D1F092
0.6.2
0.6.2
Apr 30 2015
S110 8.0.0, 0.2
OK
@ddewaele
ddewaele / aks-ssh.yml
Last active July 7, 2018 08:25
Azure Kubernetes Ingress Files
apiVersion: v1
kind: Service
metadata:
name: aks-ssh
spec:
selector:
app: aks-ssh
type: LoadBalancer
ports:
- protocol: TCP
@ddewaele
ddewaele / multitech-output.txt
Last active October 30, 2017 19:19
MultiTech firmware upgrade
Files are on my mac tftp server
ls -ltr /private/tftpboot/oe_rootfs.jffs2
-rwxrwxrwx 1 root wheel 65788832 Oct 30 19:46 /private/tftpboot/oe_rootfs.jffs2
ls -ltr /private/tftpboot/oe_uImage.bin
-rwxrwxrwx 1 root wheel 2801179 Oct 30 19:46 /private/tftpboot/oe_uImage.bin
Setting uboot variables via sample script (http://git.multitech.net/cgi-bin/cgit.cgi/meta-multitech.git/plain/contrib/uboot-setenv-mtcdt.minicom)
@ddewaele
ddewaele / reactjs-notes.md
Last active February 6, 2018 19:15
ReactJS Notes
@ddewaele
ddewaele / App.js
Created October 8, 2017 15:16
Facebook create app
import React, { Component } from 'react';
import './App.css';
import moment from 'moment'
class App extends Component {
state = { sensors : null }
intervalId = 0
@ddewaele
ddewaele / nifi-dump.md
Created September 18, 2017 05:48
nifi-dump.md
2017-09-18 07:44:20,884 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: []
2017-09-18 07:44:20,893 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED
2017-09-18 07:44:20,893 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED
2017-09-18 07:44:20,893 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED
2017-09-18 07:44:21,024 INFO [main] org.apache.nifi.bootstrap.RunNiFi 
"Cleanup Archive for default" Id=65 TIMED_WAITING  on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2f99ac7
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
Sep 12 18:08:21 ip-10-180-30-56 kernel: [ 1179.856967] java invoked oom-killer: gfp_mask=0x24000c0(GFP_KERNEL), nodemask=0, order=0, oom_score_adj=0
Sep 12 18:08:21 ip-10-180-30-56 kernel: [ 1179.863551] java cpuset=d8b7abb8f5c3f57348adab2da11ed3122d4d8620c2f0f16a32443914597c135d mems_allowed=0
Sep 12 18:08:21 ip-10-180-30-56 kernel: [ 1179.870239] CPU: 0 PID: 10857 Comm: java Tainted: G            E   4.9.32-15.41.amzn1.x86_64 #1
Sep 12 18:08:21 ip-10-180-30-56 kernel: [ 1179.872958] Hardware name: Xen HVM domU, BIOS 4.2.amazon 08/24/2006
Sep 12 18:08:21 ip-10-180-30-56 kernel: [ 1179.872958]  ffffc90003833c58 ffffffff812fa35f ffffc90003833d88 ffff8800d5ce9d80
Sep 12 18:08:21 ip-10-180-30-56 kernel: [ 1179.872958]  ffffc90003833ce8 ffffffff811f4afb ffffffff00000000 ffffc90000000000
Sep 12 18:08:21 ip-10-180-30-56 kernel: [ 1179.872958]  01ffc90003833cc8 ffffc90003833d88 ffffffff8117a5d0 ffffc90003833d88
Sep 12 18:08:21 ip-10-180-30-56 kernel: [ 1179.872958] Call Trace:
Sep 12 18:08:21 ip-10-180-30-56 ker
@ddewaele
ddewaele / auth.yaml
Last active September 11, 2017 06:41
ecs-docker-hub
Metadata:
  AWS::CloudFormation::Init:
  config:
  commands:
  01_add_instance_to_cluster:
  command: !Sub |
  echo ECS_CLUSTER=${ECSCluster} >> /etc/ecs/ecs.config
  echo ECS_ENGINE_AUTH_TYPE=dockercfg >> /etc/ecs/ecs.config
  echo ECS_ENGINE_AUTH_DATA="{\"https://index.docker.io/v1/\": {\"auth\": \"xxxxxxxxxxxx=\"}}" >> /etc/ecs/ecs.config