Skip to content

Instantly share code, notes, and snippets.

View magegu's full-sized avatar

Martin Guether magegu

View GitHub Profile
@magegu
magegu / app.js
Created June 24, 2019 12:55
Bürgerbot 2.0
const puppeteer = require("puppeteer");
const notifier = require("node-notifier");
const opn = require("opn");
const url =
"https://service.berlin.de/terminvereinbarung/termin/tag.php?termin=1&dienstleister=327427&anliegen[]=318998&herkunft=1";
const pollIntervalSeconds = 30;
const extract = async page => {
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s1="http://scxgxtt.phx-dc.dhl.com/euExpressRateBook/ShipmentMsgRequest" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://scxgxtt.phx-dc.dhl.com/euExpressRateBook/RateMsgRequest" xmlns:ins1="http://scxgxtt.phx-dc.dhl.com/euExpressRateBook/DeleteShipmentResponse" xmlns:ins2="http://scxgxtt.phx-dc.dhl.com/euExpressRateBook/DeleteShipmentRequest" xmlns:ins3="http://scxgxtt.phx-dc.dhl.com/euExpressRateBook/RateMsgResponse" xmlns:ins4="http://scxgxtt.phx-dc.dhl.com/euExpressRateBook/ShipmentMsgResponse">
<env:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-1">
<wsse:Username>DeveloperTest</wsse:Username>
@magegu
magegu / PDFstats.rb
Created March 16, 2017 15:44
print dina4/dina3 stats for PDF files in recursive folders
require 'pdf-reader'
def check_pdf(input_path)
dina5count = 0
dina4count = 0
dina3count = 0
dina2count = 0
dina1count = 0
dina0count = 0
@magegu
magegu / multipart.js
Last active July 11, 2023 20:12
mutipart upload for aws s3 with nodejs based on the async lib including retries for part uploads
/*
by Martin Güther @magegu
just call it:
uploadFile(absoluteFilePath, callback);
*/
var path = require('path');
var async = require('async');
package daos
import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import play.api.Play.current
import play.modules.reactivemongo._
import reactivemongo.api._
import reactivemongo.api.indexes._
import reactivemongo.bson._
import reactivemongo.bson.handlers.BSONReader
RCKey*
retrieveDataKey (DevMediaInfo *pDevMediaInfo, char *psPKCS12FileName, char *psPassword, byte aDataKeyIndex[])
{
int a = 0, i = 0;
printf("devType: %d,serial:%s, NodeName:%s, mediaIdentifier:%s, pkcs12file:%s, pwd: %s",
pDevMediaInfo->devType,
pDevMediaInfo->serialNumber,
pDevMediaInfo->wordwideNodename,
pDevMediaInfo->mediaIdentifier,
psPKCS12FileName,