Skip to content

Instantly share code, notes, and snippets.

@m-gagne
m-gagne / rbenv-install.sh
Last active May 27, 2019 00:26 — forked from jnx/rbenv-install-system-wide.sh
Set's up local user rbenv with Ruby 2.0.0
# Update, upgrade and install development tools:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential git-core libssl-dev libsqlite3-dev curl nodejs nginx
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Add rbenv to the path:
echo 'export RBENV_ROOT=~/.rbenv' >> ~/.bash_profile
@m-gagne
m-gagne / download_azure_friday_videos.ps1
Last active August 29, 2015 14:09
Powershell script to download all of Azure Friday videos from RSS feed
function GetFeedPageCount ($url) {
$feed=[xml](New-Object System.Net.WebClient).DownloadString($url)
$pageCount = $feed.rss.channel.pageCount
return $pageCount;
}
function DownloadFeed ($url) {
$feed=[xml](New-Object System.Net.WebClient).DownloadString($url)
foreach($i in $feed.rss.channel.item) {
$url = New-Object System.Uri($i.enclosure.url)
@poiriersimon
poiriersimon / get-TeamsChannelsAnalytics.ps1
Last active August 26, 2020 14:53
Get Teams Channels Analytics to CSV file
#This is a quick and dirty way to dump all the last 90 days analytics of a Team to a CSV file
#Requirement :
#-Install-module MicrosoftTeams
#-Get your bearer token and replace it in the variable
$UPN = "user@domain.com"
$TeamDisplayName = "My Team To Analyse"
$bearer ="Bearer ESAsadmaisjdoasjdoaskdokasopdkasopdjaiopjdd very long bearer token"
###########
$headers = @{