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 ( | |
"encoding/json" | |
"testing" | |
) | |
type foo struct { | |
ID string `json:"_id"` | |
Index int `json:"index"` |
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
# To use Gittalk comments https://github.com/gitalk/gitalk#Usage | |
# jekyll synatx: https://jekyllrb.com/docs/liquid/ | |
gittalk: | |
# Note: A GitHub Application is needed for authorization, if you don't have one, going to https://github.com/settings/applications/new register a new one. | |
# You must specify the website domain url in the Authorization callback URL field. | |
clientID: # GitHub Application Client ID | |
clientSecret: # GitHub Application Client Secret, | |
repository: blog-comments # Storage gittalk's repository | |
owner: colynn # GitHub repo owner, | |
admin: colynn # GitHub repo owner and collaborators, only these guys can initialize github issues eg. 'colynn,daattali' |
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
require 'yaml' | |
require 'base64' | |
kube_path = File.join(ENV['HOME'], '.kube') | |
file_config = File.read File.join(kube_path, 'config') | |
config = YAML.load file_config | |
ca = Base64.decode64 config["clusters"][0]["cluster"]["certificate-authority-data"] | |
File.open(File.join(kube_path, 'ca.crt'), File::CREAT|File::TRUNC|File::RDWR, 0644) do |f| | |
f.write(ca) |
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 os | |
import sys | |
from collections import namedtuple | |
from ansible.parsing.dataloader import DataLoader | |
from ansible.vars import VariableManager | |
from ansible.inventory import Inventory | |
from ansible.executor.playbook_executor import PlaybookExecutor | |
def playbook_executor_instance(ex_vars): |
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
#!/usr/bin/python3 | |
import logging, sys | |
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) | |
from collections import namedtuple | |
from ansible.parsing.dataloader import DataLoader | |
from ansible.vars import VariableManager | |
from ansible.inventory import Inventory | |
from ansible.playbook.play import Play |