Skip to content

Instantly share code, notes, and snippets.

@cbrherms
cbrherms / gist:976fbf774b757b446ee0b7613815e1f7
Last active September 22, 2020 21:51 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 20px; }
@media (min-width: 768px){
body{ padding-top: 150px; }
}
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; max-width: 650px; margin: 0 auto; }
@cbrherms
cbrherms / unsynced365.ps1
Created September 11, 2019 23:20
Undelete all unsynced (deleted) 365 users
$Users = Get-MsolUser -All -ReturnDeletedUsers ;
$Users | ForEach-Object{Restore-MsolUser -ObjectId $_.ObjectId} ;
$Users | ForEach-Object{Set-MsolUser -ObjectId $_.ObjectId -ImmutableId ""}
@cbrherms
cbrherms / client.py
Created February 27, 2019 22:37 — forked from codeinthehole/client.py
Sample Python client for working with the Octopus Energy REST API
# Requires the requests library (install with 'pip install requests')
import requests
class APIClient(object):
BASE_URL = "https://api.octopus.energy/v1"
class DataUnavailable(Exception):
"""
Catch-all exception indicating we can't get data back from the API