Skip to content

Instantly share code, notes, and snippets.

View kangguru's full-sized avatar

Lars kangguru

View GitHub Profile
@kangguru
kangguru / gist:a9cd8ac91c9bfe24494e3a794374ae35
Created May 31, 2018 14:18
Busch Jäger ZigBee Switch and Philipps Hue
* plugin wall switch (and let it search for open networks)
* open the hue app and go to setting > add switches
* the wall switch should glow once its joined the network
* press the top 2 buttons of the switch until both led are on
* press the right button to open the network
* power a battery switch, it will glow once it has joined the network
* press the top 2 buttons of the battery switch
* press the right button for 2 seconds
* a network scan will happen
* to store scences press the button for 15 seconds
# Create a client
client = Epics::Client.new(....)
# print the public key for A (E and X work the same way):
puts client.a.key.public_key.to_s
# the public digest is directly accessible via:
puts client.a.public_digest
// ==UserScript==
// @name Edit Readme on Github
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author kangguru
// @include /https://github.com//
// @grant none
// ==/UserScript==
@kangguru
kangguru / autossh.service
Created July 1, 2016 07:08 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
<snippet>
<content><![CDATA[
require "byebug"; byebug
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>bye</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.ruby</scope>
</snippet>
@kangguru
kangguru / notification.js
Last active November 9, 2017 09:20
Mangopay Notifications
// ==UserScript==
// @name Mangopay Notifications
// @namespace http://tampermonkey.net/
// @version 0.1
// @description simulate mangopay notifications direct from the dashboard
// @author Lars Brillert
// @include /https://dashboard.sandbox.mangopay.com/Users/\d+/WalletTransactions/\d+/
// @grant none
// ==/UserScript==
/* jshint -W097 */
curl -i -X POST \
-H "Content-Type:application/json" \
-H "Accept:application/json" \
-d \
'' \
'https://fintechtoolbox.com/validate/iban?iban=DE51370501981929807319'
@kangguru
kangguru / heroku-clean.go
Last active December 22, 2020 12:46
Clean Collaborators from Heroku
package main
import "os/exec"
import "fmt"
import "net/http"
import "io/ioutil"
import "bufio"
import "os"
import "encoding/json"
@kangguru
kangguru / gist:c5b1219433d2044e10cd
Created January 28, 2015 11:17
packager-ruby-error
oot@ip-172-30-0-137:/opt/ruby-2.1/bin# ./gem install ffi -v '1.9.6'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
/opt/ruby-2.1/bin/ruby extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
java.io.FileNotFoundException: /opt/elasticsearch/logs/graylog2_index_search_slowlog.log (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)