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
import requests | |
headers = {"Authorization": "token *******************"} | |
def run_query(query): | |
'''A simple function to use requests.post to make the API call. Note the | |
json= section. | |
''' | |
request = requests.post('https://api.github.com/graphql', |
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
import netCDF4 | |
import sys | |
USED_VARS = set([ | |
'carbonmonoxide_total_column', | |
'longitude', | |
'latitude', | |
'qa_value', | |
'delta_time']) |
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 | |
set -eux | |
HOST="http://localhost:8080" | |
TMP_MP="$(mktemp)" | |
TMP_DC="$(mktemp)" | |
NOW="$(date --utc +%Y-%m-%dT%H:%MZ)" | |
START="$(date -d "1 min" --utc +%Y-%m-%dT%H:%MZ)" | |
END="$(date -d "2 min" --utc +%Y-%m-%dT%H:%MZ)" |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/codegangsta/martini" | |
"github.com/garyburd/redigo/redis" | |
"github.com/martini-contrib/render" | |
) |
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
server { | |
# Enforce HTTPS by redirecting requests | |
listen 80; | |
listen [::]:80; | |
server_name {{ inventory_hostname }}; | |
location / { | |
return 301 https://$host$request_uri; | |
} | |
# Directly handle ACME challenges |
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/sh | |
PRINT=true | |
LOGGER=false | |
warning_days=30 | |
certs_to_check='example.com:443 | |
mail.example.com:25 | |
wiki.example.org:443 | |
' |