Skip to content

Instantly share code, notes, and snippets.


Frédéric Bolvin Fensterbank

View GitHub Profile
Fensterbank / qrcode-with-logo.js
Created Apr 30, 2021
Generate qr code with company logo in the middle
View qrcode-with-logo.js
const QRCode = require('qrcode');
const sharp = require('sharp');
const { v4: uuidv4 } = require('uuid');
/* entity is the object containing the company logo, url is the url the QR code points to */
const entity = {
logo: { url: '...' }
const url = 'https://company.tld'
Fensterbank / blaettle_loader.rb
Last active Dec 9, 2016
Downloads the newest edition of the parish newsletter 's Blättle from the city of Metzingen
View blaettle_loader.rb
#!/usr/bin/env ruby
require 'nokogiri'
require 'open-uri'
require 'date'
puts "#{"%F %T")} 's Blättle Downloader 1.0.0"
doc = Nokogiri::HTML(open(''))
doc.css('.multiList li:first a').each do |link|
puts "#{"%F %T")} Aktueller Eintrag ist #{link.attributes['title'].value}"
target_filepath = "ausgaben/#{link.content.gsub(/'s/, 's')}.pdf"
Fensterbank /
Created Dec 7, 2016
Creates random nextcloud users by using RandomAPI and nextclouds provisioning API
for person in `curl "" -s -X GET`; do
IFS=',' read -r -a array <<< "$person"
if [ ${array[1]} != "name.first" ]; then
echo "Create ${array[1]} ${array[2]}"
curl "https://adminuser:password@domain.tld/ocs/v1.php/cloud/users" -X POST -s -d userid="${array[1]} ${array[2]}" -d password="password1433"