Skip to content

Instantly share code, notes, and snippets.

View h0ru5's full-sized avatar

Johannes Hund h0ru5

  • Germany
  • 00:13 (UTC +02:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am h0ru5 on github.
  • I am h0ru5 (https://keybase.io/h0ru5) on keybase.
  • I have a public key whose fingerprint is 064F 3DFF 023E E2FF 5ADF DA33 F530 C2B6 9164 3FB3

To claim this, I am signing this object:

@h0ru5
h0ru5 / main.js
Created February 9, 2019 19:26
connecting to AWS IoT through a HTTP CONNECT
const {toProxyOpts, proxyConnect } = require("./proxy-connect")
// using it to connect to AWS IoT through a HTTP CONNECT proxy
const aws = require("aws-iot-device-sdk");
const proxyUrl = process.env.http_proxy || "http://localhost:3128/";
const opts = {
keyPath: "assets/device.private.key",
certPath: "assets/device.cert.pem",
@h0ru5
h0ru5 / thingweb-servient.td.jsonld
Created September 2, 2016 21:57
missing hrefs in properties
{
@context: "http://w3c.github.io/wot/w3c-wot-td-context.jsonld",
name: "servient",
uris: [
"coap://192.168.178.67/things/servient",
"http://192.168.178.67:8088/things/servient"
],
properties: [
{
name: "numberOfThings",
@h0ru5
h0ru5 / Makefile
Created October 11, 2015 13:17
Makefile for neopixel wrapper in java
JNI_INCLUDE = "/usr/lib/jvm/default/include"
all: java rpi_ws281x.so
rpi_ws281x.so: ws2811.o dma.o pwm.o rpi_ws281x_wrap.o
${CC} -shared -o $@ $^
java: python/rpi_ws281x.i
mkdir -p java
swig -java -outdir java $<
REM aus i'X 9/15: https://www.heise.de/artikel-archiv/ix/2015/09/092_Nicht-waehlerisch
REM *** Telemetry & Data Collection abstellen ***
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata" /v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableUAR" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
@h0ru5
h0ru5 / architecture.md
Last active August 29, 2015 14:22
Architecture including scripting APIs

![Virtual Instance](http://g.gravizo.com/g? @startuml; package "Browser \n Web Client" {; [Browser Engine] -down- Client; [Browser Engine] -right- %28%29 ClientSide_ScriptAPI; [Client Side Script] -left- %28%29 ClientSide_ScriptAPI; }; package "Virtual Instance" {; Servient -down- [Event Sources] ; Servient -down- [Resources] ;

@h0ru5
h0ru5 / skeleton.md
Last active August 29, 2015 14:22
Skeleton for grapvizio

![Virtual Instance](http://g.gravizo.com/g? @startuml; package "Virtual Instance" {; Servient -down- [Event Sources] ; Servient -down- [Recources] ; Servient -down- [Actions]; }; package "Real Thing" {; Mech_El_IF -down- [Sensors]; Mech_El_IF -down- [State];

@h0ru5
h0ru5 / checkbox.sh
Last active August 29, 2015 14:12
gather some information about an embedded linux device to find the right crosscompile-toolchain
echo "kernel"
cat /proc/version
echo "libc*"
strings /lib/libc* | grep GCC | uniq
echo "libc6"
strings /lib/libc.so.6 |grep 'GNU C'
@h0ru5
h0ru5 / gist:4637148
Created January 25, 2013 19:34
Error message running "sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production --trace" after gitlab upgrade from 4.0 to 4.1
undefined method `path_to_repo' for nil:NilClass
/home/gitlab/gitlab/lib/tasks/gitlab/check.rake:823:in `block in check_repos_post_receive_hooks_is_link'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:21:in `each'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:21:in `block in find_each'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:20:in `find_each'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/querying.rb:8:in `find_each'
/home/gitlab/gitlab/lib/tasks/gitlab/check.rake:821:in `check_repos_post_receive_hooks_is_lin