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' | |
services: | |
redis-cluster: | |
image: grokzen/redis-cluster | |
environment: | |
IP: 127.0.0.1 # docker for macだとこれ必要 | |
ports: | |
# デフォルト設定でclusterとして扱えるポートは下記 | |
- '6379:6379' |
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
import argparse | |
parser = argparse.ArgumentParser(description='Help message Zzzzzz.') | |
parser.add_argument( | |
'--param1', | |
choices=['foo', 'bar', 'baz'], | |
required=True, | |
help='Description param1' | |
) | |
parser.add_argument( |
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
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
const slack_url = process.env.slack_url; | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; | |
exports.handler = function (event, context) { |
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
<?php | |
/** | |
* 例外をスタックするためのクラス | |
*/ | |
class ExceptionHolder | |
{ | |
/** | |
* 既存の例外に新規の例外をスタックさせて返す | |
* |
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
#!/usr/bin/env ruby | |
# | |
# Excelの差分抽出スクリプト | |
# Excelは.xls形式じゃないと読み込めない | |
# Spreadsheetが必要なので、無い場合はインストールする | |
# | |
# $ sudo gem install spreadsheet | |
# | |
# usage: ruby excel_diff.rb <xls filename1> <xls filename2> |
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
#!/bin/bash | |
diff="" | |
name="" | |
if [ $# -eq 1 ]; then | |
if expr "$1" : '.*[^0-9].*' > /dev/null ; then | |
diff=" HEAD ${1}" | |
name="HEAD ~ ${1}" | |
else | |
diff=" HEAD HEAD~${1}" | |
name="HEAD ~ HEAD~${1} " |
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
print(($_%3?$_%5?"$_":buzz:$_%5?fizz:fizzbuzz)."\n")for 1..100 |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Lifegame</title> | |
<style> | |
body { background-color: black; } | |
.contents { width: 100%; text-align: center; } | |
</style> | |
</head> |
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
$ary = (1...10).to_a | |
$player = -1 | |
$cnt = 1 | |
def showDisp | |
puts "Select number between 1...9" | |
(0...9).each do |i| | |
if (i + 1) % 3 == 0 then | |
puts getStone($ary[i]) | |
else |