Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import requests_oauthlib
url = 'http://10.0.0.205/MAAS'
mac_url = '{}/api/2.0/machines/?format=json'.format(url)
api_key = 'YOUR MAAS API KEY'
_keys = api_key.split(':')
consumer_key = _keys[0]
access_token = _keys[1]
@xameeramir
xameeramir / default nginx configuration file
Last active June 22, 2024 13:25
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#