Skip to content

Instantly share code, notes, and snippets.

@al4
al4 / osauth.sh
Last active July 15, 2016 16:01
Prompt to select openstack environment
#!/usr/bin/env bash
function osauth() {
osauth_dir="~/.osauth"
# List files in ~/.osauth
tenant_paths=(~/.osauth/*.sh)
# Strip the leading path
tenant_files=(${tenant_paths[@]#~/.osauth/})
# Strip the trailing file name

Keybase proof

I hereby claim:

  • I am al4 on github.
  • I am al4 (https://keybase.io/al4) on keybase.
  • I have a public key whose fingerprint is B392 46B1 C11D 7DA5 FE24 CC22 9B42 928D 3BAC 2277

To claim this, I am signing this object:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>ERROR: The requested URL could not be retrieved</title> <style type="text/css"><!-- %l body :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } :lang(he) { direction: rtl; } --></style> </head><body id=ERR_UNSUP_REQ> <div id="titles"> <h1>ERROR</h1> <h2>The requested URL could not be retrieved</h2> </div> <hr> <div id="content"> <p>The following error was encountered while trying to retrieve the URL: <a href="https://ebayclassifiedsgroup.slack.com/services/hooks/nagios?">https://ebayclassifiedsgroup.slack.com/services/hooks/nagios?</a></p> <blockquote id="error"> <p><b>Unsupported Request Method and Protocol</b></p> </blockquote> <p>Squid does not support all request methods for all access protocols. For example, you can not POST a Gopher request.</p> <p>Your cache administrator
@al4
al4 / setDatasource.py
Created April 8, 2015 19:49
Set the datasource on grafana dashboards
#!/usr/bin/env python
import sqlite3
import json
"""
Quick quick script to set the datasource for grafana dashboards
"""
OLD_DATASOURCE = 'null'