Skip to content

Instantly share code, notes, and snippets.

@yohfee
yohfee / Setup.ps1
Created July 19, 2023 05:02
Install Mackerel Agent to Windows
param(
[parameter(mandatory=$true)][String]$ApiKey
)
$url = if ([System.Environment]::Is64BitOperatingSystem) {
"https://mackerel.io/file/agent/msi/mackerel-agent-x64-latest.msi"
} else {
"https://mackerel.io/file/agent/msi/mackerel-agent-latest.msi"
}
@yohfee
yohfee / calc.fs
Last active January 11, 2023 06:50
RTC2022
module Sample01 =
type Stack = float list
let stack = [ 1.0; 2.0; 3.0 ]
type Stack = Contents of float list
module Sample02 =
let stack = Contents [ 1.0; 2.0; 3.0 ]
let (Contents contents) = stack
@yohfee
yohfee / ddsk.fsx
Last active August 4, 2022 03:04
ドドスコード
let next =
let rand = System.Random()
fun () -> [| "ドド"; "スコ" |] |> Array.item (rand.Next 2)
let fin = String.replicate 3 "ドドスコスコスコ"
""
|> Seq.unfold (fun s ->
if s.EndsWith(fin) then
None
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
)
# rails new your_kuroko2_application --database=mysql --skip-turbolinks --skip-javascript -m https://gist.githubusercontent.com/yohfee/630e36781c6577b9e9e109a7019f0d2f/raw/2c34d3e15fa4cae3f4228edd1039305f52f83b7c/kuroko2_app_template.rb
gsub_file 'Gemfile', /^gem 'turbolinks'.+/, ""
gsub_file 'Gemfile', /^gem 'jbuilder'.+/, ""
gsub_file 'Gemfile', /^gem 'jquery-rails'.+/, ""
gsub_file 'Gemfile', /^gem 'coffee-rails'.+/, ""
gsub_file 'config/database.yml', "encoding: utf8", "encoding: utf8mb4"
gsub_file 'config/database.yml', "host: localhost", "host: 127.0.0.1"
gem 'kuroko2', github: 'yohfee/kuroko2', branch: 'sign_in_with_azure'
@yohfee
yohfee / app_template.rb
Last active July 15, 2021 23:48
rails template
# rails new app_name --database=mysql -m https://gist.github.com/yohfee/674fefebb1a33a828096fbb57ac13877/raw/9e5db01584b8ced1aa9b6e013de369744bbd63d5/app_template.rb
gem 'simple_form'
gem 'slim-rails'
gem 'high_voltage'
gem 'autoprefixer-rails'
gem 'recipient_interceptor'
gem 'title'
gem 'bourbon'
gem 'neat'
@yohfee
yohfee / app_template.rb
Last active July 15, 2021 23:47
kuroko2 custom template
# rails new your_kuroko2_application --database=mysql --skip-turbolinks --skip-javascript -m https://gist.githubusercontent.com/yohfee/63b6ff8fef8fbf2f4abdb52cdbf8aba1/raw/8da11a9ac8651119a61190fd5a6cdb74c6791aa1/app_template.rb
gsub_file 'Gemfile', /^gem 'turbolinks'.+/, ""
gsub_file 'Gemfile', /^gem 'jbuilder'.+/, ""
gsub_file 'Gemfile', /^gem 'jquery-rails'.+/, ""
gsub_file 'Gemfile', /^gem 'coffee-rails'.+/, ""
gsub_file 'config/database.yml', "encoding: utf8", "encoding: utf8mb4\n collation: utf8mb4_bin\n charset: utf8mb4"
environment 'config.time_zone = "Asia/Tokyo"'
# -*- mode: ruby -*-
# vi: set ft=ruby :
# =================================================#
# Ruby on Rails Development Environment #
# U | _"\ u U /"\ u ___ |"| / __"| u #
# \| |_) |/ \/ _ \/ |_"_| U | | u <\___ \/ #
# | _ < / ___ \ | | \| |/__ u___) | #
# |_| \_\ /_/ \_\ U/| |\u |_____||____/>> #
# // \\_ \\ >>.-,_|___|_,-.// \\ )( (__)#
# (__) (__)(__) (__)\_)-' '-(_/(_")("_)(__) #
* cli
cd src/github.com/yohfee
mkdir react-flux-redo
cd react-flux-redo
* index.html
<!DOCTYPE html>
<html>
<body>
データ データ形式 データ基準日 ライセンス
町名別年齢(各歳)別住民基本台帳人口 EXCEL 平成26年10月1日 [![ccby][by]][cc]
町名別年齢(各歳)別住民基本台帳人口 EXCEL 平成26年4月1日 [![ccby][by]][cc]
指定避難所 CSV 平成27年1月1日 [![ccby][by]][cc]
広域避難場所 CSV 平成27年1月1日 [![ccby][by]][cc]
地域避難場所 CSV 平成27年1月1日 [![ccby][by]][cc]
津波避難ビル CSV 平成27年1月1日 [![ccby][by]][cc]
津波避難場所 CSV 平成27年1月1日 [![ccby][by]][cc]