I hereby claim:
- I am yasulab on github.
- I am yasulab (https://keybase.io/yasulab) on keybase.
- I have a public key whose fingerprint is 3855 17EF EF4E 021C 8ACB 82D9 9C1A FC61 753B 1C26
To claim this, I am signing this object:
#!/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.
This script enables you to broadcast your terminal with ScreenX + RackHub.
Demo Broadcasting available by 2012/09/10