Skip to content

Instantly share code, notes, and snippets.

@gcchaan
gcchaan / x2_2m.php
Created February 24, 2013 11:11
生物統計学。カイ二乗検定(データ形式:2×m) Chi-Square Test of Independence (for biostatistics)
<html lang=ja>
<head>
<meta http-equiv="Content-Type" content="text/HTML; charset=EUC-JP">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
<!--
.top {border-top: 1px solid #000000;}
.jouge {border-top: 1px solid #000000;
border-bottom: 1px solid #000000;}
.bot {border-bottom: 1px solid #000000;}
@gcchaan
gcchaan / 7kai_hyou.php
Created February 24, 2013 11:30
カイ2乗分布表 Chi-square distribution
<?php
//[p][df]
//0.05
$kai_hyou[5][1] = 3.84;
$kai_hyou[5][] = 5.99;
$kai_hyou[5][] = 7.81;
$kai_hyou[5][] = 9.49;
$kai_hyou[5][] = 11.07;
$kai_hyou[5][] = 12.59;
$kai_hyou[5][] = 14.07;
@gcchaan
gcchaan / stopwatch.html
Created August 6, 2013 16:17
Stop Watch written in Javascript.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>ストップウォッチ</title>
</head>
<body>
<div id="hour"></div>
<div id="minute"></div>
<div id="second">0.00</div>
@gcchaan
gcchaan / svg_path_previewer.html
Created December 14, 2013 08:01
when you input a path of SVG ,'Online SVG path Viewer' rend the vector the path code quickly!
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>SVGプレビュワー</title>
<script src="jquery-2.0.3.min.js"></script>
<script>
$(function(){
$('textarea').bind('keypress blur change',function(){
$('path').attr("d",$(this).val());
@gcchaan
gcchaan / koukasokutei.html
Created April 19, 2014 14:29
measure of effect for website
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>SEO効果測定</title>
<script src="../jquery-2.0.3.min.js"></script>
<script>
$(document).ready(function(){
function getRound(num,m){
num *= Math.pow(10,m);
@gcchaan
gcchaan / setHoliday.gs
Created September 11, 2014 15:24
自分のカレンダーの業務時間あたりに翌々月の祝日を自動でセットする。月1でトリガー。moment.jsが必要
function setHoliday() {
var startTime = momentjs.moment().add('months', 2).date(1);
var endTime;
var end = momentjs.moment();
var daysInMonth = end.daysInMonth();
endTime = end.add('months', 2).date(daysInMonth);
var holidayCalendar = CalendarApp.getCalendarById(
'ja.japanese#holiday@group.v.calendar.google.com');
var mstHoliday = holidayCalendar.getEvents(new Date(startTime), new Date(endTime));
@gcchaan
gcchaan / cfn_run.sh
Last active October 2, 2020 11:46
troposphere runner
#!/bin/bash
# https://gist.github.com/gcchaan/ad8fd83a68467503ec3e6392ebbd519a
set -ef -o pipefail
function message(){
echo 🍣 "$1"
}
function help(){
@gcchaan
gcchaan / data.ts
Last active March 12, 2018 12:23
Amazon Cognito PreSignUp DomainValidation
export function event(triggerSource = '', userAttributes = null) {
return {
triggerSource: triggerSource,
request: {
userAttributes: userAttributes,
validationData: null
},
response: {
autoConfirmUser: false,
autoVerifyEmail: false,
@gcchaan
gcchaan / karabiner.json
Created August 27, 2019 11:22
REALFORCE .config/karabiner/karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {