Skip to content

Instantly share code, notes, and snippets.

View takkanm's full-sized avatar

Mitsutaka Mimura takkanm

  • Tokyo, Japan
View GitHub Profile
require 'rubygems'
require 'rack'
run(lambda do
system 'killall X'
[200, { 'Content-Type' => 'text/plain' }, ['Goodbye!']]
end)
@akiinyo
akiinyo / FizzBuzz
Created October 27, 2011 13:14
素直にかくとこうなる。
range = 1..100
range.each do |num|
if (num%3 == 0 && num%5 == 0)
p 'FizzBuzz'
elsif (num%3 == 0)
p 'Fizz'
elsif (num%5 == 0)
p 'Buzz'
else
p num
@seki
seki / drip_actor.rb
Created November 8, 2012 12:35
simple actor
require 'drip'
module Actor
class Ether
def initialize
@drip = Drip.new(nil)
Thread.current['channel'] = create_channel
end
def create_channel
require 'foreman/engine/cli'
procfile = File.expand_path('../../Procfile', __FILE__)
envfile = File.expand_path('../../.env', __FILE__)
foreman = Foreman::Engine::CLI.new
foreman.load_procfile(procfile)
foreman.load_env(envfile) if File.exist? envfile
RSpec.configure do |config|
@nobu
nobu / extmk.rab
Created September 10, 2016 04:18
= extmk
: author
中田伸悦
= 拡張ライブラリ
@yymm
yymm / want_to_ergodox.md
Last active May 27, 2020 00:44
Ergodox買おうの会

この記事のあの画像を見てビビッと来てしまったので, 周りにいる人とErgodoxの購入検討をはじめました(随時更新)

購入できるところ

➜ FalbaTech

ErgoDox - FalbaTech

選んでいくスタイル。

@esehara
esehara / gist:3160352
Created July 22, 2012 17:21
良い Commit Messageを書きましょう(翻訳)

by https://github.com/erlang/otp/wiki/Writing-good-commit-messages

良いコミットメッセージは、重要な役割が、少なくとも三つあります。

  • レビューするプロセスをスピードアップする。
  • 良いリリースノートを書く手助けになる。
  • 将来、Erlang/OTPのメンテナンスを手助けするため(もしかしたら君かも!)。それは五年後の未来において、なんでコードの中で特定の変更が加えられたのか、あるいは特定の機能が追加されたのか見つけるため、ということ。
@voluntas
voluntas / react.rst
Last active May 25, 2022 11:57
React コトハジメ

React コトハジメ

日時

2017-01-02

@voluntas

バージョン

2.1.0

URL

https://voluntas.githu.io/

突っ込みは Twitter @voluntas まで。

@practicingruby
practicingruby / mrdi.md
Created December 19, 2012 22:29
Models, Roles, Decorators, and Interactions -- A modest proposal for a toned done version of DCI that isn't as janky as Concerns.

Models, Roles, Decorators, and Interactions

A modest alternative to DCI that might be worth further thought

One of the problems with advancing the discussion on DCI is that we lack a comparable alternative pattern that has the same goals, but favors a low ceremony approach. The closest thing we have to that is Rails concerns, but they are more like distant relatives of the DCI concepts rather than first cousins, and that makes comparisions between the two approaches not especially fruitful.

I am considering the idea of experimenting with my own paradigm that captures the intent and purity of DCI, but with the convenience of concerns. Please note that this is just the starting point of a conversation, it is NOT a promise of comercially available cold fusion or a cure for cancer. It's just a gist with an idea on it I'd like to hear your thoughts on.

What if we had a top-level topology that was split into Models, **Rol

このドキュメントは古いです。最新のPRKの実装については公式Wikiをご覧ください

keymap.rbのPRKからの変更点・追加点

  • kbd.define_mode_keyではなくvia.define_mode_keyを使う(引数は同一)
  • kbd.start!の前にkbd.append viaする
    • kbd.append viaしなければVIA機能のないPRKとして使えます
    • kbd.append viaしていなくてもRemapにデバイスが表示されますが、仕様です。
  • :defaultレイヤーはVIAのレイヤー0で上書きされる
  • layer_count * rows_size * cols_sizeは240を上回ってはいけない(メモリが不足して動かなくなる)