Skip to content

Instantly share code, notes, and snippets.

ongaeshi ongaeshi

Block or report user

Report or block ongaeshi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ongaeshi
ongaeshi / foo.rb
Last active Aug 7, 2019
mruby 2.0.1 with mruby-require
View foo.rb
class Foo
end
@ongaeshi
ongaeshi / sample.md
Last active Feb 28, 2019
モバイルでも書きやすいMarkdwon風のプログラム言語
View sample.md
  • mobcode
  • mobgram
  • minimo
  • pico
  • picoco
  • marimo

Rubyへのトラスレーターとして実装する
Rubyに変換できればOpal経由でJSでも実行できる

View shape.as
void Main()
{
Window::Resize(640, 640);
double t = 0.0;
while (System::Update()) {
t += System::DeltaTime() * 0.2;
for (int32 i = 0; i < 9; i++) {
const Vec2 center(120 + i % 3 * 200, 120 + i / 3 * 200);
View camera2d.rb
font = Font.new(30)
camera = Camera2D.new
while System.update do
camera.update
camera.transform do
font["Camera2D Test"].draw_at(320, 200)
Circle.new(320, 240, 50).draw([255, 0, 0, 127])
end
View gist:85fe0a427be088ccb5892f6e4e427f9c
Detected memory leaks!
Dumping objects ->
{20101} normal block at 0x0975DDF8, 32 bytes long.
Data: < ? > 00 00 00 00 00 00 F0 3F 00 00 00 00 00 00 00 00
{20100} normal block at 0x0975A698, 24 bytes long.
Data: < X @ $ > 00 00 00 00 00 58 83 40 00 00 00 00 00 00 24 C0
{19936} normal block at 0x0975D808, 32 bytes long.
Data: < ? > 00 00 00 00 00 00 F0 3F 00 00 00 00 00 00 00 00
{19935} normal block at 0x0975A608, 24 bytes long.
Data: < X @ $ > 00 00 00 00 00 58 83 40 00 00 00 00 00 00 24 C0
View radiko.rb
# coding: utf-8
module Radiko
class Radiko
# channel
# TBS .. TBSラジオ
# RN1 .. ラジオNIKKEI第1
# RN2 .. ラジオNIKKEI第2
# RBC .. RBCiラジオ
# CRK .. ラジオ関西
# RKB .. RKBラジオ
View radiko.rb
# coding: utf-8
module Radiko
class Radiko
# channel
# TBS .. TBSラジオ
# RN1 .. ラジオNIKKEI第1
# RN2 .. ラジオNIKKEI第2
# RBC .. RBCiラジオ
# CRK .. ラジオ関西
# RKB .. RKBラジオ
View radiko
# coding: utf-8
require "radiko/radiko"
include Radiko
c "山下達郎のサンデー・ソングブック", "Sun 14:00", %w(FMT RADIONERRY FMO E-RADIO FMAICHI FMGIFU)
c "Z-POP COUNTDOWN 30", "Sat 13:00", %w(ZIP-FM)
c "ライムスター宇多丸のウィークエンドシャッフル", "Sat 22:00", %w(TBS RAB YBC RBC)
c "菊地成孔の粋な夜電波", "Sun 20:00", %w(TBS IBC YBC RFC BSN)
c "オレたちゴチャ・まぜ", "Sun 1:50", %w(MBS)
c "ライムスター宇多丸とマイゲーム・マイライフ", "Sun 0:0", %w(TBS)
View junk.rb
# coding: utf-8
require "radiko/radiko"
include Radiko
def c(channel, wday)
Radiko::Radiko.new(channel, last_wday(wday + 1, 1, 0)).astr(channel)
end
def junk(title, wday)
print title, "\n",
c("TBS", wday), " ",
You can’t perform that action at this time.