Skip to content

Instantly share code, notes, and snippets.

View tenten0213's full-sized avatar
💭
😇

tenten0213 tenten0213

💭
😇
View GitHub Profile
@tenten0213
tenten0213 / docker-compose.yml
Created November 16, 2016 04:10
Rocket.chat、Hubot用docker-compose.yml
rocketchat:
image: rocketchat/rocket.chat:latest
volumes:
- ./uploads:/app/uploads
environment:
- PORT=3000
- ROOT_URL=http://localhost:3000
- MONGO_URL=mongodb://mongo:27017/rocketchat
# - HTTP_PROXY=http://proxy.domain.com
# - HTTPS_PROXY=http://proxy.domain.com
@tenten0213
tenten0213 / xcode_shortcut.md
Last active November 8, 2016 10:54
Xcodeでよく使うショートカット集
@tenten0213
tenten0213 / solarized_dark.ini
Created January 16, 2014 05:17
puttyをsolarizedのカラースキームに変える。 putty.iniの変えたいセッションのColourの値をGistの値で上書く。
Colour0="131,148,150"
Colour1="147,161,161"
Colour2="0,43,54"
Colour3="7,54,66"
Colour4="0,43,54"
Colour5="238,232,213"
Colour6="7,54,66"
Colour7="0,43,56"
Colour8="220,50,47"
Colour9="203,75,22"
module.exports = (robot) ->
robot.hear /tired/, (msg) ->
robot.brain.data.count = 0 unless robot.brain.data.count
robot.brain.data.count += 1
robot.brain.save
if robot.brain.data.count < 3 then msg.send "Let's take a short break." else msg.send "You must take a break."
robot.hear /fine/, (msg) ->
robot.brain.data.count = 0
robot.brain.save
cron = require('cron').CronJob
module.exports = (robot) ->
robot.enter ->
new cron
cronTime: "0 0 9 * * *"
start: true
timeZone: "Asia/Tokyo"
onTick: ->
robot.send {room: "#hoge"}, "朝会の時間です。"
@tenten0213
tenten0213 / fizzbuzz.coffee
Last active December 26, 2015 11:59
HubotにFizzBuzzを答えさせる
# Description:
# hubot answer the FizzBuzz Question
#
# Commands:
# hubot fizzbuzz N - Reply result of FizzBuzz
module.exports = (robot) ->
robot.respond /fizzbuzz( (\d+))?/i, (msg) ->
count = msg.match[2] || 100
msg.send ['Fizz' unless i%3] + ['Buzz' unless i%5] or i for i in [1..count]
@tenten0213
tenten0213 / index.html
Last active December 24, 2015 21:19
秋だしビールだよね!ってことで都道府県別の二条麦の収穫量と作付面積をグラフ化。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link type="text/css" rel="stylesheet" href="style.css"/>
<div id="chartContainer">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v1.1.1.min.js"></script>
<script type="text/javascript">
var svg = dimple.newSvg("#chartContainer", 1890, 900);
@tenten0213
tenten0213 / data.csv
Created October 7, 2013 07:43
米とさつまいもの収穫量、作付面積をグラフ化
species year ha kg t
Sweet potato 1980 64800 2030 1317000
Sweet potato 1981 65000 2240 1458000
Sweet potato 1982 65700 2110 1384000
Sweet potato 1983 64800 2130 1379000
Sweet potato 1984 64600 2170 1400000
Sweet potato 1985 66000 2310 1527000
Sweet potato 1986 65000 2320 1507000
Sweet potato 1987 64000 2220 1423000
Sweet potato 1988 62900 2110 1326000
@tenten0213
tenten0213 / josiryoku.xml
Last active December 24, 2015 07:40
女子力
<?xml version="1.0"?>
<settings>
<console>
<colors>
<color id="0" r="240" g="215" b="192"/>
<color id="1" r="38" g="139" b="210"/>
<color id="2" r="133" g="153" b="0"/>
<color id="3" r="42" g="161" b="152"/>
<color id="4" r="220" g="50" b="47"/>
<color id="5" r="211" g="54" b="130"/>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Data Binding</title>
</head>
<body>
<div id="fruits">
<p>リンゴ</p>
<p>オレンジ</p>