Skip to content

Instantly share code, notes, and snippets.

View fholzer's full-sized avatar

Ferdinand Holzer fholzer

  • Entain plc
  • Vienna, Austria
View GitHub Profile
@fholzer
fholzer / runAll.sh
Last active September 7, 2016 14:10
phantomjs website test
for i in direct cf-static-only cf-full akamai; do
mkdir -p data/$i
done
docker pull fholzer/phantomjs-website-test
docker run -dm 400M -v $(pwd)/data/direct:/opt/app/data --add-host scmedia.itsfogo.com:195.72.135.201 --add-host sports.gamebookers.com:195.72.135.219 --name pwt-direct fholzer/phantomjs-website-test 'https://sports.gamebookers.com/en/sports#sportId=4'
docker run -dm 400M -v $(pwd)/data/cf-static-only:/opt/app/data --add-host scmedia.itsfogo.com:198.41.209.142 --add-host sports.gamebookers.com:195.72.135.219 --name pwt-cf-static-only fholzer/phantomjs-website-test 'https://sports.gamebookers.com/en/sports#sportId=4'
docker run -dm 400M -v $(pwd)/data/cf-full:/opt/app/data --add-host sports.gamebookers.com:198.41.209.142 --add-host scmedia.itsfogo.com:198.41.209.142 --name pwt-cf-full fholzer/phantomjs-website-test 'https://sports.gamebookers.com/en/sports#sportId=4'
docker run -dm 400M -v $(pwd)/data/akamai:/opt/app/data --name pwt-akamai fholzer/phantomjs-website-test 'https://sports.gameboo
@fholzer
fholzer / gist:34abd52203c978ea443ad6a248dc6455
Created July 13, 2017 13:56 — forked from svrc-personal/gist:5a8accc57219b9548fe1
JDK 8 seems to use /dev/urandom and /dev/random more sensibly
Summary of Behaviour:
A. OpenJDK 7 b65.
1. Default in java.security is securerandom.source=/dev/urandom
2. If securerandom.source=/dev/urandom, NativePRNG is used, SecureRandom.nextBytes() is non-blocking via /dev/urandom ; SecureRandom.generateSeed(x) is blocking via /dev/random
3. if securerandom.source=/dev/random, then SHA1PRNG is used. Initial seed is blocking via /dev/random. No other accesses.
4. If securerandom.source=/dev/./urandom then SHA1PRNG is used. Initial seed is non-blocking via /dev/./urandom. No other accesses.
B. Oracle JDK 8 b25.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>svg foreignObject test</title>
<style type="text/css">
html, body {
margin: 0;
padding: 0;
}
@fholzer
fholzer / ansible-inventory-patch.diff
Last active February 21, 2019 20:28
ansible inventory plugin patch
--- __init__.py.bak 2019-02-21 17:23:21.768801439 +0000
+++ __init__.py 2019-02-21 20:05:12.171070413 +0000
@@ -40,15 +40,6 @@
from ansible.utils.display import Display
display = Display()
-_SAFE_GROUP = re.compile("[^A-Za-z0-9_]")
-
-
-# Helper methods
@fholzer
fholzer / tombstone-count.sh
Last active June 1, 2021 09:57 — forked from JensRantil/tombstone-count.sh
How to count number of tombstones per partition key in one or multiple sstables.
#!/bin/bash
#
# Counts number of tombstones per partition key in one or multiple sstables.
#
# Usage: ./tombstone-count.sh /var/lib/cassandra/data/mykeyspace/mytable/*-Data.db
#
# Sample output:
# "40e6a9839bf44bdaa624cc53e96733fe" 8
# "8e177ab222c14f868bcb6d2922b18d2b" 8
# "28aaa9db0dad4ae78cabe8bcc25d14a3" 9
[user@user-pc node-addon-api-tsfn]$ valgrind -s node --expose-gc test/test_binding.js
==6991== Memcheck, a memory error detector
==6991== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==6991== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==6991== Command: node --expose-gc test/test_binding.js
==6991==
Consumer::Close called. releasing tsfn...
Consumer::Close called. tsfn released.
ThreadSafeFunction finalizer called
==6991== Invalid write of size 8
<#
Create Unix VM's.
PREREQUISITES:
- A VM that has been installed with an OS that supports cloud-init
- cloud-init is installed on the vm
How it works:
- Asks for a bunch of parameters
- Creates a disk from parent vhdx for speed
@fholzer
fholzer / PhilipsRemoteCluster-init-rdm001.patch
Created August 29, 2023 22:29
PhilipsRemoteCluster diff
colordiff -wub p-init.py p-rdm001.py
--- p-init.py 2023-08-29 23:58:18.662019044 +0200
+++ p-rdm001.py 2023-08-29 23:58:17.972036079 +0200
@@ -21,27 +21,29 @@
class PhilipsRemoteCluster(CustomCluster):
"""Philips remote cluster."""
- cluster_id = 0xFC00
+ cluster_id = 64512
name = "PhilipsRemoteCluster"

Emitted Events

Dim Behavior

Some devices send dim events others don't. Some of those that send dim events additionally send press events, others don't.

Device Dim Events Additional Press Events on Dimm
RWL020 ? ?
RWL021 up/down buttons No