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/python | |
"""Script to fetch email from outlook.""" | |
import win32com.client | |
def extract(count): | |
"""Get emails from outlook.""" | |
items = [] | |
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") | |
inbox = outlook.GetDefaultFolder(6) # "6" refers to the inbox |
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
# First download an Azure Publish File | |
# Get-AzurePublishSettingsFile | |
# save the file somewhere special | |
#Import file | |
Import-AzurePublishSettingsFile \path\to\pushlish-settings-file.publishsettings | |
Login-AzureRmAccount |
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
find -name "*.jpg" | gawk 'BEGIN{ a=1}{printf "mv %s %5d.jpg\n", $0, rand()*100000000}' | bash |
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
try { | |
$null = Get-AzureRmSubscription | |
} | |
catch { | |
Login-AzureRmAccount | |
} | |
$subscriptions = Get-AzureSubscription | |
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 | |
logger curl -i http://localhost:50070/jmx |
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/python | |
import json | |
import sys | |
from pprint import pprint | |
import fileinput | |
data = json.load(sys.stdin) | |
for d in 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
#!/bin/bash | |
# Replace the placeholders with your access token and ea number | |
# Replace the date with the month you are interested in YYYY-MM | |
wget -d --header="authorization: bearer REPLACE_WITH_ACCESS_TOKEN" --header="api-version: 1.0" -O usagereport.csv "https://ea.azure.com/rest/REPLACE_WITH_EA_NUMBER/usage-report?month=2017-10&type=detail&fmt=Csv" |
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 python3 | |
"""Slurp all Images and text from the blog into a folder.""" | |
from urllib.request import urlopen, urlretrieve | |
from bs4 import BeautifulSoup | |
from datetime import datetime | |
import os | |
import re | |
import os.path | |
OlderNewer