curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
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 { | |
ssl_session_timeout 10m; | |
ssl_certificate {{ path_to_crt }}; | |
ssl_session_cache shared:SSL:10m; | |
server_name {{ hostname }}; | |
ssl_certificate_key {{ path_to_key }}; | |
client_max_body_size 1024m; | |
ssl on; | |
listen 443; |
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
from __future__ import print_function | |
from googleapiclient.discovery import build | |
from httplib2 import Http | |
from oauth2client import file, client, tools | |
from oauth2client.service_account import ServiceAccountCredentials | |
from googleapiclient.discovery import build | |
import os | |
# If modifying these scopes, delete the file token.json. | |
SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly' |
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
{ | |
"_meta": { | |
"hostvars": { | |
"reddit-app": { | |
"ansible_ssh_host": "104.155.51.167", | |
"gce_description": null, | |
"gce_id": "6094057286689219920", | |
"gce_image": "reddit-app-base-20180709-095917", | |
"gce_machine_type": "g1-small", | |
"gce_metadata": { |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
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
# python 2.7 | |
""" Read data from a spreadsheet to construct an HTML signature, and update users. | |
This is enough code to get you going. | |
You have a service account via a project setup on the Google Developer console. | |
Download the key in json format. | |
Next you need to go to the domain's Google admin to enable the correct google API. | |
The scope is API_scopes =['https://apps-apis.google.com/a/feeds/emailsettings/2.0/'] | |
In more detail: | |
1. Follow the oauth2 notes to make a service account and download a JSON private key as usual. You do that on the developer console. The service account is not linked to any domain, it is just a credential. |
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
function getSignature() { | |
//pretty basic function for testing | |
if ( startupChecks()) { return; } | |
var email = SpreadsheetApp.getActiveSpreadsheet().getActiveCell().getValue().toString(); | |
if ( email === "" ) { | |
Browser.msgBox("No email selected", "Please select a cell containing a user's email" , Browser.Buttons.OK); | |
return; | |
} | |
var result = authorisedUrlFetch(email, {}); | |
Browser.msgBox(result.getContentText()); |
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/python | |
# | |
# Copyright 2016 Flavio Garcia | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |