- 実装の詳細 (GitHub): coderdojo-japan/coderdojo.jp#1706
- 英版版の統計ページ (成果物): https://coderdojo.jp/english/stats
- /english/stats ルートを追加
- StatsController に言語判定機能を追加(lang パラメータ)
- グラフタイトル、凡例、軸ラベルを英語対応
- ページ内のすべてのテキストを条件分岐で英語化
- 都道府県名の英語表記に対応(Hokkaido, Tokyo など)
- /english/stats ルートを追加
- StatsController に言語判定機能を追加(lang パラメータ)
- グラフタイトル、凡例、軸ラベルを英語対応
- ページ内のすべてのテキストを条件分岐で英語化
- 都道府県名の英語表記に対応(Hokkaido, Tokyo など)
#!/usr/bin/env ruby | |
# Sample Output | |
# pi@raspberrypi:~ $ ruby adt7410.rb | |
# Path: /dev/i2c-1 | |
# Temp: 29.26 | |
require 'i2c' | |
I2C_RETRIES = 0x0701 |
require 'pi_piper' | |
include PiPiper | |
port = 15 | |
pin = PiPiper::Pin.new :pin => port, :direction => :out | |
dot = 0.2 | |
dash = 1.0 | |
CHAR_TIMING = { | |
"a" => [dot, dash], "b" => [dash, dot, dot, dot], "c" => [dash, dot, dash, dot], |
// Edit this keymap file and save to apply. | |
[ | |
{ "command": "gotoend", "keys": { "mac": ["Ctrl-E"] } }, | |
{ "command": "goToNextError", "keys": { "mac": [""] } }, | |
{ "command": "togglerecording", "keys": { "mac": [""] } }, | |
{ "command": "toggleWordWrap", "keys": { "mac": [""] } }, | |
{ "command": "closetab", "keys": { "mac": ["Ctrl-W"] } }, | |
{ "command": "gototableft", "keys": { "mac": ["Ctrl-["] } }, | |
{ "command": "gototabright", "keys": { "mac": ["Ctrl-]"] } }, | |
{ "command": "blockindent", "keys": { "mac": [""] } }, |
I hereby claim:
To claim this, I am signing this object:
class Player | |
def play_turn(warrior) | |
if @health.nil? | |
# initialize if needed | |
end | |
if warrior.feel.empty? | |
if warrior.health < 20 | |
if @health <= warrior.health # not taking damage | |
warrior.look.each.with_index do |s,i| |
#! /usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
### Settings | |
# 1. To use SocketIO, type the following: | |
# $ gem install socketio-client | |
require "SocketIO" | |
# 2. Tune to your channel | |
# Ex. http://screenx.tv/#{channel} |
# encoding: utf-8 | |
# NOTE: :center, :code, :block, and :section | |
slide <<-EOS, :center | |
\e[1m... now preparing ...\e[0m | |
YASUKAWA, Yohei | |
@YasuLab |
ScreenX TV is a web service that lets you broadcast your terminal to the world. It is often used for a hackathon, lecture, and opensource activity. And this gist explains how to broacdcast your terminal using it.
To install screenxtv
command, you can broadcast your terminal anytime, and there are two ways, Ruby and GCC. In both ways, you need to use screen before installing screenxtv
command.
This script installs and runs ScreenX TV Client using /tmp
directory.
Type the following command to run the script:
curl -s -L https://gist.github.com/raw/4193154/ac1905f9f130467d07f3f6dce83f8226983f5df1/install.sh | sh
See ScreenX TV Client repository for details.