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
| FROM zabbix/zabbix-web-apache-pgsql:ubuntu-latest | |
| USER root | |
| RUN apt-get clean && apt-get update && \ | |
| apt-get -y install fonts-ipafont && \ | |
| rm -f /etc/alternatives/zabbix-frontend-font && \ | |
| rm -f /usr/share/zabbix/assets/fonts/DejaVuSans.ttf && \ | |
| update-alternatives --install /usr/share/zabbix/assets/fonts/DejaVuSans.ttf zabbix-frontend-font /usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf 50 && \ | |
| update-alternatives --set zabbix-frontend-font /usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf && \ | |
| chown -R www-data:www-data /usr/share/zabbix/assets/ && \ | |
| chmod -R 744 /usr/share/zabbix/assets && \ |
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
| # -*- coding: utf-8 -*- | |
| # | |
| # STS動作確認サンプルその2 | |
| # 要 AWS SDK for Ruby V3 | |
| require 'aws-sdk-core' | |
| require 'aws-sdk-ec2' | |
| require 'aws-sdk-s3' | |
| require 'yaml' | |
| require 'pp' |
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
| # -*- coding: utf-8 -*- | |
| # | |
| # AWS Organizationsを利用したアカウント作成の自動化(https://aws.amazon.com/jp/blogs/news/account-management-automation-using-aws-organizations/) | |
| # をRubyに焼き直していくつか改善したもの。 | |
| # 要 AWS SDK for Ruby V3 | |
| require 'aws-sdk-core' | |
| require 'aws-sdk-organizations' | |
| require 'aws-sdk-sns' | |
| require 'aws-sdk-cloudwatch' |
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
| # -*- coding: utf-8 -*- | |
| # | |
| # ACMに登録された証明書を出力するサンプルスクリプトです。 | |
| # 要 AWS SDK for Ruby V3 | |
| require 'aws-sdk-core' | |
| require 'aws-sdk-acm' # V3になって個別ロードになった。 | |
| require 'yaml' | |
| require 'pp' |
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
| { | |
| "title": "Harry Potter and the Philosopher's Stone", | |
| "author": "J.K. Rowling", | |
| "hoge": { | |
| "stringField": "piyo", | |
| "numField": 123, | |
| "floatField": 20.315, | |
| "boolField": false, | |
| "huga": { | |
| "piyo": ["orange","apple"] |
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
| //ルートノード | |
| var root_node = new json_sample.RootObject(); | |
| root_node.title = "Harry Potter and the Philosopher's Stone"; | |
| root_node.author = "J.K. Rowling"; | |
| root_node.tags = new List<string> { "novel", "story", "magic" }; | |
| root_node.valiableTags = new List<object> { 123, false, "str" }; | |
| root_node.intArray = new List<int> { 1, 2, 3, 4, 5 }; | |
| root_node.floatArray = new List<double> { 1.2, 1.3, 1.4, 2.0 }; | |
| root_node.date = "2016/11/29T12:34:56.000"; |
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
| using System.Collections.Generic; | |
| namespace json_sample | |
| { | |
| namespace JsonNodeHoge | |
| { | |
| public class Huga | |
| { | |
| public List<string> piyo { get; set; } | |
| } |
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
| using System; | |
| using System.Windows.Forms; | |
| using RazorEngine; | |
| using System.IO; | |
| using RazorEngine.Configuration; | |
| using RazorEngine.Text; | |
| using RazorEngine.Templating; | |
| namespace template_sample | |
| { |
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
| //一時ディレクトリ作成 | |
| string temp_path = Path.GetTempPath(); | |
| string temp_dir_name = Path.GetRandomFileName(); | |
| string temp_dir = Path.Combine(temp_path, temp_dir_name); | |
| try | |
| { | |
| if (Directory.Exists(Path.Combine(temp_path, temp_dir_name))) | |
| { | |
| Directory.Delete(temp_dir, true); | |
| } |
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
| # Use 'ruby clone-github.rb' | |
| # ユーザー名とかdepthオプションは自分で書き換えてください。 | |
| require "json" | |
| require "open-uri" | |
| response = open("https://api.github.com/users/Hiroto-K/repos?per_page=100").read | |
| JSON.parse(response).each do |info| | |
| clone_url = info["ssh_url"] | |
| to = info["name"] |