imagemagickのソースコードはpeclから入手しておく。 stableで最新のバージョンをダウンロードするので問題なさそう。
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
PUT /books | |
{ | |
"mappings": { | |
"properties": { | |
"isbn": {"type": "keyword"}, | |
"title": {"type": "text"}, | |
"title_kana": {"type": "text"}, | |
"subtitle": {"type": "text"}, | |
"subtitle_kana": {"type": "text"}, | |
"authors": { |
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
require 'net/https' | |
require 'bigdecimal' | |
require 'json' | |
def download_coverage | |
uri = URI.parse('https://api.openbd.jp') | |
http = Net::HTTP.new(uri.host, uri.port) | |
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
require 'google-id-token' | |
class Hello | |
def check | |
token = '' | |
client_id = '' | |
validator = GoogleIDToken::Validator.new | |
validator.check(token, client_id) | |
end | |
end |
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
Vagrant.configure("2") do |config| | |
# config.vm.box = "bento/ubuntu-16.04" | |
config.vm.define "controller" do |controller| | |
controller.vm.box = "bento/ubuntu-16.04" | |
controller.vm.hostname = "controller" | |
controller.vm.network :private_network, ip: "192.168.33.2" | |
controller.vm.network :forwarded_port, id: "ssh", guest: 22, host: 2210 | |
controller.vm.synced_folder './workspace', '/vagrant' | |
end |
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
- hosts: 192.168.33.3 | |
tasks: | |
- name: ensure apache is at the latest version | |
apt: | |
name: apache2 | |
state: latest | |
become: yes | |
become_method: sudo | |
handlers: | |
- name: restart apache |
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
<?php | |
$args = array( | |
'paged' => $paged, | |
'tax_query' => array( | |
'relation' => 'OR', | |
array( | |
'taxonomy' => 'publisher', | |
'field' => 'slug', | |
'terms' => array('kodansha') |
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
<?php | |
// Here your code ! | |
$conditions = array( | |
array(1, 2, 3, 4, 5), | |
array(2, 3, 5), | |
array(2, 3, 5), | |
); | |
$result = array_reduce($conditions, function($carry, $item){ | |
if (is_null($carry)) { |
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
require 'pp' | |
# require 'forwardable' | |
# | |
# class Delegate | |
# extend Forwardable | |
# | |
# def_delegator :@children, :[] | |
# def_delegator :@block, :call | |
# | |
# def initialize() |
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
require 'pp' | |
require 'forwardable' | |
class Node | |
extend Forwardable | |
attr_reader :parent | |
attr_reader :children | |
attr_writer :proc | |
def_delegator :@children, :[] | |
def_delegator :@children, :key? |
NewerOlder