Skip to content

Instantly share code, notes, and snippets.

View Holger-Will's full-sized avatar
🎯
Focusing

Holger Will Holger-Will

🎯
Focusing
View GitHub Profile
@Holger-Will
Holger-Will / resetGPG
Last active September 15, 2016 09:07
reset yubikey Neo GPG
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
@Holger-Will
Holger-Will / searchableselect.user.js
Last active June 20, 2017 09:55
Collmex Searchable Select
// ==UserScript==
// @name Collmex Searchable Select
// @namespace https://klimapartner.de
// @version 1.0
// @description alle dropdows sind durchsuchbar
// @author Holger Will
// @match https://www.collmex.de/cgi-bin/cgi.exe?*
// @require http://code.jquery.com/jquery-latest.js
// @require https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/js/select2.min.js
// @resource select2_CSS https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/css/select2.min.css
@Holger-Will
Holger-Will / jwtRS256.sh
Last active May 6, 2024 00:35
generate public private key pair (RSA RS256) for use with koa-jwt jasonwebtoken etc.
# generate private key
openssl genrsa -out private.pem 2048
# extatract public key from it
openssl rsa -in private.pem -pubout > public.pem
diff --git a/nheqminer/libstratum/ZcashStratum.cpp b/nheqminer/libstratum/ZcashStratum.cpp
index 7eac7199..6cc047bf 100644
--- a/nheqminer/libstratum/ZcashStratum.cpp
+++ b/nheqminer/libstratum/ZcashStratum.cpp
@@ -490,7 +490,7 @@ ZcashJob* ZcashMiner::parseJob(const Array& params)
// TODO: On a LE host shouldn't this be le32toh?
ret->header.nVersion = be32toh(version);
- if (ret->header.nVersion == 4) {
+ if (ret->header.nVersion > 29) { //BIP 9
@Holger-Will
Holger-Will / flatten.js
Created July 18, 2018 06:22
convert an svg path to line segments
function flatten(path,num){
var l = path.getTotalLength()
var p = path.getPointAtLength(0)
var d = `M${p.x} ${p.y}`
for(var i = (l/num);i<=l;i+=(l/num)){
p = path.getPointAtLength(i)
d+=`L${p.x} ${p.y}`
}
path.setAttribute("d",d+"z")
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<style>
svg{background:grey;width:400px;height:400px}
</style>
</head>
<body>
@Holger-Will
Holger-Will / wall
Created September 14, 2018 03:58
wall
module wall(width,height,windows,doors){
difference(){
color("white") cube([width,20,height]);
for(w=windows){
color("white") translate([w[2],-10,w[3]]) cube([w[0],40,w[1]]);
}
}
for(w=windows){
translate([w[2],-10,w[3]]) window(w[0],w[1]);
}
var d1 = Buffer.from("08","hex")
console.log(pack(d1,5).toString("hex"))
// pack(data-buffer,packet-type,optional-data-buffer)
function hex(num,pad){
return num.toString(16).padStart(pad,"0")
}
@Holger-Will
Holger-Will / übergang.html
Created June 11, 2019 14:15
kanalübergang
<html>
<head>
<title></title>
<meta content="">
<style>
.r1{stroke:#999}
.r2{stroke:#333;}
</style>
</head>
<body>