Skip to content

Instantly share code, notes, and snippets.

View OJezu's full-sized avatar

Christopher Chrapka OJezu

View GitHub Profile
@OJezu
OJezu / minimal-reproduction.js
Created December 17, 2019 10:44
Azure/azure-sdk-for-js#6577 cannot copy zero-length files
const {BlobServiceClient, generateBlobSASQueryParameters} = require("@azure/storage-blob");
require("dotenv").config();
const connectionString = process.env.AZURE_TEST_CONNECTION_STRING;
const containerName = process.env.AZURE_TEST_CONTAINER;
// MAGIC VALUE, empty buffer causes errors/timeouts, non-empty buffer is copied
const content = Buffer.from('');
async function getSignedUrl(blobClient){
@OJezu
OJezu / dump-users.sh
Created June 4, 2020 12:25
Dump all users and priviledges on MySQL server
#!/bin/sh
mysql "$@" -AN <<'SQL'
SELECT CONCAT('CREATE USER ', QUOTE(user), '@', QUOTE(host), ' IDENTIFIED WITH ', QUOTE(plugin), ' AS ', QUOTE(authentication_string), ';')
FROM mysql.user WHERE user<>'' AND host<>''
ORDER BY user, host
;
SQL