Skip to content

Instantly share code, notes, and snippets.

View aycabta's full-sized avatar

aycabta aycabta

  • Space Pirates, LLC.
View GitHub Profile

RubyKaigi 2021

Hello, everyone. My name is Itoyanagi. I'm a climber, in particular, I do a lot of sawanobori. It is said that "the best way to enjoy the mountains is Sawanobori," so I wade through rapids in the wilderness, climb waterfalls, sometimes procure food locally, sleep by the fire, and head for the headwaters.

I was supposed to give a technical presentation on the riverside, as I always do in my online presentations, but I couldn't make it at all. So, I just spliced together some random footage from some mountains, and overlaid a technical explanation on top of it.

First of all, let me explain what the schedule was like this time. When I was accepted to RubyKaigi, I hadn't implemented any of the accepted features. This is a rough technique called "Kaigi Driven Development" that Ruby committers often use to make progress by taking advantage of the fact that they will have to implement the content to present it. The deadline for submitting videos for this year's English presentation was August 31s

aycabta /
Last active March 31, 2018 10:31
RDoc with frozen_string_literal

RDoc with frozen_string_literal

# use Ruby 2.4.3
$ ruby -v
ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]

# source code of Ruby 2.4.3
$ find . -maxdepth 1 -name "ruby-2.4.3"
# Reads unified diff file of CRuby documents between "before" and "after"
# from standard input and removes fixed line number changes
class MyRemover
def initialize
@lines = STDIN.readlines
@pos = 0
puts read_file_sections.flatten.join
aycabta /
Last active September 7, 2017 15:14
if [ $# -ne 1 ]; then
echo 'Usage: ./ username/repository'
exit -1
GITHUB_USERNAME=`echo $GITHUB_REPOSITORY_PATH | sed -e 's/\/.\+$//'`
if [ ! -d original-rdoc ]; then
all: freebsd_pwm
freebsd_pwm: freebsd_pwm.o
clang freebsd_pwm.o -o freebsd_pwm
freebsd_pwm.o: freebsd_pwm.c
clang -c freebsd_pwm.c
rm freebsd_pwm freebsd_pwm.o
all: test
test: test.o
gcc bcm2835-1.50/src/bcm2835.o test.o -o test
test.o: test.c
gcc -c -Ibcm2835-1.50/src/ test.c
rm test test.o
require 'mechanize'
EMAIL = ''
agent =
agent.user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36'
puts 'log in try...'
page = agent.get('')
signin_path ='script').map(&:text).select { |t| t.include?('nav-flyout-ya-signin') }.first.gsub(/^.+nav-flyout-ya-signin[^>]+><a href='([^']+)'.+$/m, '\1')
aycabta / dymo.rb
Last active December 26, 2016 19:44
require 'libusb'
VENDOR_ID = 0x0922
PRODUCT_ID = 0x8003
usb_context =
device = usb_context.devices(idVendor: VENDOR_ID, idProduct: PRODUCT_ID).first
unless device
puts 'Device not found'
require 'open-uri'
require 'json'
open('') do |f|
json = JSON.parse(
puts json.size # => 1338