This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module B | |
extend self | |
@enabled = false | |
def enable! | |
return if @enabled | |
clear | |
@enabled = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:display_typed_char_zindex = 1 | |
function! s:display_typed_char() abort | |
let ch = systemlist('banner ' . v:char) | |
let winid = popup_create(ch, {"zindex": s:display_typed_char_zindex}) | |
let s:display_typed_char_zindex += 1 | |
call job_start("sleep 0.5", {"exit_cb": { -> popup_close(winid) }}) | |
endfunction | |
autocmd InsertCharPre * call s:display_typed_char() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "net/http" | |
require "json" | |
class Pipeline < BasicObject | |
def self.start | |
new | |
end | |
def initialize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'optparse' | |
require 'pathname' | |
require 'open3' | |
require 'ripper' | |
require 'etc' | |
require 'timeout' | |
def valid_syntax?(code) | |
Ripper.sexp(code) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts("Hello world") if false \ | |
&& false && | |
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'akaza' | |
class A | |
extend Akaza::Annotation | |
whitespace def sum(a, b) | |
input=StringIO.new("#{a}\n#{b}\n") | |
output=StringIO.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'akaza' | |
class A | |
extend Akaza::Annotation | |
whitespace def sum(input, output) | |
This code is never evaluated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hello, world!を出力するプログラム | |
require 'akaza' | |
Akaza.eval(" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters