This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for person in `curl "https://randomuser.me/api/?format=csv&nat=de&inc=name&results=2000" -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" | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'open-uri' | |
require 'date' | |
puts "#{DateTime.now.strftime("%F %T")} 's Blättle Downloader 1.0.0" | |
doc = Nokogiri::HTML(open('https://www.metzingen.de/de/Stadt+B%C3%BCrger/Aktuelles/Mitteilungsblatt')) | |
doc.css('.multiList li:first a').each do |link| | |
puts "#{DateTime.now.strftime("%F %T")} Aktueller Eintrag ist #{link.attributes['title'].value}" | |
target_filepath = "ausgaben/#{link.content.gsub(/'s/, 's')}.pdf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |