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 'csv' | |
| require 'securerandom' | |
| require 'benchmark' | |
| writer = CSV.open('/tmp/out.csv', 'w') | |
| Benchmark.bm 10 do |r| | |
| r.report "ベンチマーク" do | |
| 1_000_000.times.each do | |
| writer << [SecureRandom.hex(10), rand(1_000)] | |
| 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
| aaa: | |
| bbb: 123 |
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
| document.addEventListener 'turbolinks:load', -> | |
| $('.datepicker').flatpickr | |
| locale: 'ja' | |
| $('.datetimepicker').flatpickr | |
| enableTime: true | |
| time_24hr: true | |
| locale: 'ja' |
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
| rh1039:composetest kazuhisa$ docker-compose up | |
| Creating network "composetest_default" with the default driver | |
| Building web | |
| Step 1 : FROM python:3.4-alpine | |
| 3.4-alpine: Pulling from library/python | |
| 3690ec4760f9: Already exists | |
| 8cf4eb2be1b3: Pull complete | |
| a196ebb46a8b: Pull complete | |
| c72b1f1aa3a4: Pull complete | |
| Digest: sha256:4a422a07aa1b6393c1ab2cf23ff79a5c16356016350019ebf8f1d31093329bab |
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
| selectNode: (id, items)-> | |
| for i,item of items | |
| item.selected = false | |
| if item.id == id | |
| item.selected = true | |
| this.selectNode(id, item.children) |
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
| file '/etc/ImageMagick/policy.xml' do | |
| policy =<<EOS | |
| <policymap> | |
| <policy domain="coder" rights="none" pattern="EPHEMERAL" /> | |
| <policy domain="coder" rights="none" pattern="URL" /> | |
| <policy domain="coder" rights="none" pattern="HTTPS" /> | |
| <policy domain="coder" rights="none" pattern="MVG" /> | |
| <policy domain="coder" rights="none" pattern="MSL" /> | |
| <policy domain="coder" rights="none" pattern="TEXT" /> | |
| <policy domain="coder" rights="none" pattern="SHOW" /> |
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
| mysql> show variables like "chara%"; | |
| +--------------------------+----------------------------+ | |
| | Variable_name | Value | | |
| +--------------------------+----------------------------+ | |
| | character_set_client | utf8 | | |
| | character_set_connection | utf8 | | |
| | character_set_database | utf8mb4 | | |
| | character_set_filesystem | binary | | |
| | character_set_results | utf8 | | |
| | character_set_server | utf8mb4 | |
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
| # Installing Xymon | |
| ADD ./xymon-4.3.21.tar.gz /usr/local/src/ | |
| RUN cd /usr/local/src/xymon-4.3.21 && ls -l | |
| RUN cd /usr/local/src/xymon-4.3.21 && ./configure --server #ここで落ちる | |
| RUN cd /usr/local/src/xymon-4.3.21 && make && make install | |
| # 次のように変更 | |
| ADD ./xymon-4.3.21.tar.gz /usr/local/src/ | |
| RUN cd /usr/local/src/xymon-4.3.21 && ls -l | |
| RUN /usr/local/src/xymon-4.3.21/configure --server #変更 |
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
| iUQObIb0YR5TTby8v5AI |
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
| sql := 'SELECT count(*) FROM mytable WHERE inserted_by = $1' | |
| IF checked_date <> null | |
| sql := sql + 'AND inserted <= $2' | |
| END IF | |
| EXECUTE sql | |
| INTO c | |
| USING checked_user, checked_date; |
NewerOlder