- gem install tdiaryでtdiaryをインストール
- tdiary new diaryでdiaryディレクトリと関連ファイルを作成する
- cd diaryする
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
<div> | |
<canvas id="myChart"></canvas> | |
</div> | |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
<script> | |
const ctx = document.getElementById('myChart'); | |
new Chart(ctx, { |
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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
ruby "3.1.2" | |
gem "sinatra" | |
gem "puma" |
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
Usage: | |
rails new APP_PATH [options] | |
Options: | |
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated engines) | |
[--skip-collision-check], [--no-skip-collision-check] # Skip collision check | |
-r, [--ruby=PATH] # Path to the Ruby binary of your choice | |
# Default: /Users/miyohide/.rbenv/versions/3.1.1/bin/ruby | |
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL) | |
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) |
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
--- | |
layout: false | |
--- | |
require 'open3' | |
xml.instruct! | |
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do | |
xml.title "Sample Site" | |
xml.link "href" => "http://example.com" | |
xml.updated Time.now |
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
Usage: | |
rails new APP_PATH [options] | |
Options: | |
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications) | |
-r, [--ruby=PATH] # Path to the Ruby binary of your choice | |
# Default: /usr/local/bin/ruby | |
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL) | |
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) | |
# Default: sqlite3 |
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 com.github.miyohide; | |
public class SampleGame { | |
public String play(String p1, String p2) { | |
if ((p1.equals("rock") && p2.equals("scissors")) || | |
(p1.equals("scissors") && p2.equals("paper")) | |
) { | |
return "player1Win"; | |
} |
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 "minitest/autorun" | |
require "json" | |
def solve(src) | |
src_i = src.to_i(16) | |
out = [] | |
1.upto src_i do |i| | |
if (src_i & i ) == i | |
out << i | |
end |
NewerOlder