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 | |
commands=("az") | |
for cmd in "${commands[@]}"; do | |
if ! command -v "$cmd" &>/dev/null; then | |
echo "Error: $cmd command is not available. Please install $cmd" | |
exit 1 | |
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
var https = require('https'); | |
module.exports = function(context, req) { | |
context.log('Node.js HTTP trigger function processed a request. RequestUri=%s', req.originalUrl); | |
if (req.query.text) { | |
var queryURL = 'https://autocomplete.clearbit.com/v1/companies/suggest?query=' + req.query.text | |
https.get(queryURL, function(res) { | |
var responseString = ''; | |
res.on('data', function(data) { |
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
# Based on script from http://www.toddklindt.com/Scripts/downloadmp4-pptx.ps1.txt | |
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
# Grab the RSS feed for the MP4 downloads | |
$a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/Build/2013/RSS/mp4high")) | |
# Walk through each item in the feed | |
$a.rss.channel.item | foreach{ |
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
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
#Set the username for windows auth proxy | |
#$rss.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials | |
$a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/RSS/mp4high")) | |
$a.rss.channel.item | foreach{ | |
$code = $_.comments.split("/") | select -last 1 | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = $code + "-" + $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "") + ".mp4" | |
if (!(test-path $file)) |