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
https://download.llamameta.net/*?Policy=eyJTdGF0ZW1lbnQiOlt7InVuaXF1ZV9oYXNoIjoidXd3dnZzemh3cWQwZHZzYTQ2NTFybHp0IiwiUmVzb3VyY2UiOiJodHRwczpcL1wvZG93bmxvYWQubGxhbWFtZXRhLm5ldFwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcwODQ2NjYyNn19fV19&Signature=Lea2cBXYpgNT-0TnLxiS7d8A5vMpjTnTcqzfW9g7fLUqhagorfuCAUGH939vbJGGrueW3259iQNYLFRTkjsAWaa6l28PT289DDGKDSX3qgRJ28F0bEHshz7oSVi-eA8tP-huno4zRTEjLNwza23-S9sD5iw8cK-vOroTqZaXSRlrB-2%7E3jeBZ79Fr5lzP6XHFyjkZ1of445vj-6NCV3A6jqJtQ4iMyo9KtoW9i3Nfzdz0Mnm3fLuRJ7BpBg8GVsBp2j8HJySjWj2c%7E0xgurB1zcdyXNulv81AEN-3BTbMW6O6qRYdYJ2VsOvfD5J3xbZhPniC4Mb-atOJl2S6zEPgA__&Key-Pair-Id=K15QRJLYKIFSLZ&Download-Request-ID=766058328316875 |
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
//Setup: | |
// Create a sheet with the first sheet called 'TrafficData'. Cell Values are: | |
// A1: Repo Traffic Collector | |
// A3: Organization B3: <org value> | |
// A4: Repo B4: <repo name> | |
// A7: Date, B7: Views, C7: Uniques, D7: Weeknumber | |
//Tools -> Script Editor | |
//Add this script, fill in your GitHub TOKEN (https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) | |
//Run the onOpen script - you will be warned it is insecure, but accept anyway. This should add a menu item to your sheet | |
//Use the Custom GitHub menu to run the getRepoTrafficStats function |
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 argparse | |
import boto3 | |
import datetime | |
from dateutil.tz import tzutc | |
def is_in_autoscale_group(region, instance_id): | |
asg = boto3.client('autoscaling', region_name=region) | |
instances = \ | |
asg.describe_auto_scaling_instances(InstanceIds=[instance_id]) |
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 jinja2 import Environment, FileSystemLoader | |
def render_haproxy_cfg(services): | |
env = Environment(loader=FileSystemLoader ('templates'), trim_blocks=True) | |
templ = env.get_template('haproxy.jinja2.cfg') | |
outp = templ.render(services=services) | |
outp = templ.render(services=services) | |
with open('haproxy.cfg', 'wb') as f: | |
f.write(outp) |
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
provider "cloudstack" { | |
api_url = "http://localhost:8080/client/api" | |
api_key = "tZTPtxAfbZfTrIiIDe4XHfZupjlCoVYy3JnIfvlqyxWvHbVJ9TDw8UWxQ_INj6r5NWGglLMYHX4hN33sMuoI1g" | |
secret_key = "9u1bizzTQrfhnp3Y_Cs-Zu9uiOr-nAmRcN5Eo6Pp8dlbeKgq_V0TqUqhDdDGgrXFqzT8yZ731UUPTPDeFKLzzQ" | |
} | |
resource "cloudstack_vpc" "default" { | |
name = "test-vpc" | |
display_text = "test-vpc" | |
cidr = "10.0.0.0/16" |
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
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: cpx-ingress-k8s-role | |
rules: | |
- apiGroups: [""] | |
resources: ["services", "endpoints", "ingresses", "pods", "secrets"] | |
verbs: ["*"] | |
- apiGroups: ["extensions"] |
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 | |
# tested on Ubuntu 14.04 | |
#set -x | |
sudo lxc-create --template=debian --name=systemvm -- --release=wheezy | |
sudo lxc-start -n systemvm -d | |
sleep 2 | |
ip=$(sudo lxc-info -n systemvm -i | awk '{print $2}') | |
#start provisioning using ssh |
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 -x | |
master_ip=$1 | |
ipaddr=$(ip addr show dev eth0 | grep "inet " | cut -d ' ' -f 6 | cut -f 1 -d '/') | |
is_master=${2:-"true"} | |
[ -n "$master_ip" ] || exit 1 |
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 kubernetes import client, config, watch | |
config.load_kube_config() | |
api_v1 = client.CoreV1Api() | |
def watch_endpoints(): | |
w = watch.Watch() | |
for event in w.stream(api_v1.list_namespaced_endpoints, "default"): | |
print(event) | |
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
{ | |
"$schema": "https://vega.github.io/schema/vega/v4.json", | |
"width": 720, | |
"height": 720, | |
"padding": 5, | |
"autosize": "none", | |
"signals": [ | |
{ | |
"name": "labels", "value": true, |
NewerOlder