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
FROM ruby:3.2.2-slim-bullseye | |
RUN apt-get update -qq && apt-get install -y sqlite3 libsqlite3-dev build-essential vim locales | |
RUN gem install bundler | |
RUN sed -i -E 's/# (ja_JP.UTF-8)/\1/' /etc/locale.gen && locale-gen | |
ENV LANG ja_JP.UTF-8 | |
WORKDIR /app |
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
version: '3.1' | |
services: | |
mysql-db: | |
image: mysql:8.1.0 | |
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password | |
# (this is just an example, not intended to be a production configuration) | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
environment: |
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 | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# Activate the gem you are reporting the issue against. |
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
defmodule Calculator do | |
def calc() do | |
tests() | |
end | |
defp tests() do | |
val_permutation() | |
|> Enum.map(fn v -> | |
expr_product() | |
|> Enum.map(fn x -> |
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
class Application | |
def call(env) | |
sleep 5 | |
[200, { "Content-Type" => "text/html" }, [File.read('public.html')]] | |
end | |
end |
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
tap "github/gh" | |
tap "hashicorp/tap" | |
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/core" | |
tap "kayac/tap" | |
brew "automake" | |
brew "coreutils" | |
brew "asdf" | |
brew "awscli" |
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 main | |
import ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
InitUlidGenerator(nil) |
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
% go run ulid/ulid.go | |
Unixtime with nanosec | |
01F3W0VG46FH5P40MEEY68ME80 | |
01F3W0VG467PHG5QEV57V2K7PF | |
01F3W0VG46GSWCC2GEC8G0N3WW | |
01F3W0VG46PX26DX5B59Q2GPX3 | |
Unixtime with sec | |
01F3W0VG0GAH38AX7EJ2NJ557A | |
01F3W0VG0GAH38AX7EJ2NJ557A | |
01F3W0VG0GAH38AX7EJ2NJ557A |
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
function getUsers() { | |
const appProps = PropertiesService.getDocumentProperties() | |
const usersStr = appProps.getProperty('users') | |
const users = JSON.parse(usersStr) | |
return users | |
} | |
function setUsers(users) { | |
const appProps = PropertiesService.getDocumentProperties() | |
appProps.setProperty('users', JSON.stringify(users)) |
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
FROM mysql | |
#ポートを開ける | |
EXPOSE 3306 | |
#MySQL設定ファイルをイメージ内にコピー | |
ADD ./my.cnf /etc/mysql/conf.d/my.cnf | |
#docker runに実行される | |
CMD ["mysqld"] |
NewerOlder