- Hubot であそぼう
This file contains hidden or 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/env python | |
| # -*- coding: utf-8 -*- | |
| import time | |
| import datetime | |
| format = "%Y-%m-%d %H:%M:%S" | |
| class CallbackModule(object): | |
| def __init__(self): |
I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.
What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.
Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.
This file contains hidden or 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
| [ client ] --> [ :8443 stud ] --> [ :8888 haproxy ] ---> [ :80 nginx ] | |
| +---------------------------> [ :9443 haproxy ] -/ |
This file contains hidden or 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 ( | |
| "fmt" | |
| "strings" | |
| "time" | |
| ) | |
| func main() { | |
| time.Sleep(3 * time.Second) |
This file contains hidden or 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 ( | |
| "github.com/flosch/pongo2" | |
| "github.com/gin-gonic/gin" | |
| "net/http" | |
| ) | |
| type pongoRender struct { | |
| cache map[string]*pongo2.Template |
This file contains hidden or 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 string.fromhex(str) | |
| return (str:gsub('..', function (cc) | |
| return string.char(tonumber(cc, 16)) | |
| end)) | |
| end | |
| function string.tohex(str) | |
| return (str:gsub('.', function (c) | |
| return string.format('%02X', string.byte(c)) | |
| end)) |
| 日時: | 2015-01-10 |
|---|---|
| 作: | @voluntas |
| バージョン: | 0.3.4 |
| url: | http://voluntas.github.io/ |
注意
This file contains hidden or 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
| /* /Applications/HipChat.app/Contents/Resources/chat-osx.css */ | |
| p, div { | |
| font-family: Helvetica; | |
| } | |
| p, div, .nameBlock p, .messageBlock p, .messageBlock div, .messageBlock pre { | |
| /* These are %-based to enable text size scaling options. The default text size is defined | |
| by a function on the WebPreferences object */ | |
| font-size: 100%; |