Skip to content

Instantly share code, notes, and snippets.


Martin Šošić Martinsos

View GitHub Profile
Martinsos /
Last active Oct 16, 2019
Script that uses NetworkManager to disconnect wifi card when wifi dongle connects and to reconnect it when wifi dongle disconnects.
#!/usr/bin/env bash
# This script should be positioned in /etc/NetworkManager/dispatcher.d/
# This script disconnects wifi card when wifi dongle connects and reconnects wifi card when
# wifi dongle disconnects. That way, when dongle is connected, we are sure it is being used instead of
# wifi card being used, and it all happens automatically.
Martinsos / parseAzureBlobUri.js
Last active Jun 17, 2020
Regex for parsing Azure Blob URI (javascript)
View parseAzureBlobUri.js
* Validates and parses given blob uri and returns storage account, container and blob names.
* @param {string} blobUri - Valid Azure storage blob uri.
* Check link for more details: .
* Few examples of valid uris:
* -
* -
* -$root/myblob
* @returns {Object} With following properties:
* - {string} storageAccountName