Skip to content

Instantly share code, notes, and snippets.

Avatar
🐔
In the chicken

FUNABARA Masao masoo

🐔
In the chicken
View GitHub Profile
View proposal.rb
# coding: utf-8
require "erb"
require "optparse"
proposal_file = nil
requester = nil
request_title = nil
crowdsourcing_site_name = nil
options = OptionParser.new
View jma.rb
# MIT License
# -----------
#
# Copyright (c) 2019 FUNABARA Masao
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
View jma.rb
# MIT License
# -----------
#
# Copyright (c) 2019 FUNABARA Masao
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
@masoo
masoo / ruby-csharp_script_sample009.rb
Created Jul 9, 2017
ruby-csharp_script sample #9
View ruby-csharp_script_sample009.rb
# coding: utf-8
require 'ruby/csharp_script'
csharp_script = Ruby::CSharpScript::CSharpScript.new
code = <<"EOS"
using System;
for (int i=0; i<10; i++) {
Console.WriteLine("C#: " + i.ToString(" 0"));
@masoo
masoo / Dockerfile
Created Jul 21, 2016
gitpub pages を作成できる Dockerfile
View Dockerfile
FROM masoo/ubuntu-rbenv-ruby:2.3.1
MAINTAINER FUNABARA Masao
RUN \
sudo apt-get install -y nodejs && \
zsh -c "curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -"
RUN \
zsh -c "source ~/.zshrc && gem install github-pages"
@masoo
masoo / ruby-csharp_script_sample008.rb
Created Jul 15, 2016
ruby-csharp_script sample #8
View ruby-csharp_script_sample008.rb
require 'pp'
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
class Sample
{
public int x;
@masoo
masoo / ruby-csharp_script_sample007.rb
Created Jul 15, 2016
ruby-csharp_script sample #7
View ruby-csharp_script_sample007.rb
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
new int[] { 1, 3, 5, 7, 9 }
EOS
result = csharp_script.EvaluateAsync(code)
p result
@masoo
masoo / ruby-csharp_script_sample006.rb
Created Jul 15, 2016
ruby-csharp_script sample #6
View ruby-csharp_script_sample006.rb
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
"Hello, Ruby!"
EOS
result = csharp_script.EvaluateAsync(code)
p result
@masoo
masoo / ruby-csharp_script_sample005.rb
Created Jul 15, 2016
ruby-csharp_script sample #5
View ruby-csharp_script_sample005.rb
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
10.08
EOS
result = csharp_script.EvaluateAsync(code)
p result
@masoo
masoo / ruby-csharp_script_sample004.rb
Created Jul 15, 2016
ruby-csharp_script sample #4
View ruby-csharp_script_sample004.rb
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
1
EOS
result = csharp_script.EvaluateAsync(code)
p result