This file contains hidden or 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 specifies files that are *not* uploaded to Google Cloud Platform | |
| # using gcloud. It follows the same syntax as .gitignore, with the addition of | |
| # "#!include" directives (which insert the entries of the given .gitignore-style | |
| # file at that point). | |
| # | |
| # For more information, run: | |
| # $ gcloud topic gcloudignore | |
| # | |
| .gcloudignore | |
| # If you would like to upload your .git directory, .gitignore file or files |
This file contains hidden or 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 hidden or 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
| # Description: | |
| # Listen for a specific title from Qiita:Team | |
| # | |
| # Dependencies: | |
| # None | |
| # | |
| # Configuration: | |
| # HUBOT_QIITA_TEAM | |
| # HUBOT_QIITA_TOKEN | |
| # |
This file contains hidden or 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
| def polynomial(numbers, x) | |
| r = 0 | |
| numbers.each_with_index do |n, i| | |
| r += n * x**i | |
| end | |
| r | |
| end | |
| def polynomial2(numbers, x) | |
| ary = [1, x] |
This file contains hidden or 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
| // Fetch the default set of models for this collection, resetting the | |
| // collection when they arrive. If `reset: true` is passed, the response | |
| // data will be passed through the `reset` method instead of `set`. | |
| fetch: function(options) { | |
| options = options ? _.clone(options) : {}; | |
| if (options.parse === void 0) options.parse = true; | |
| var success = options.success; | |
| var collection = this; | |
| options.success = function(resp) { | |
| var method = options.reset ? 'reset' : 'set'; |
This file contains hidden or 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
| class IO | |
| def write(string) | |
| str = string.is_a?(String) ? string : string.to_s | |
| return str.size unless str.size > 0 | |
| len = syswrite(str) | |
| if str.size == len | |
| @pos += len | |
| return len | |
| end |
This file contains hidden or 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
| $ ruby t.rb | |
| OK | |
| $ ./tmp/mruby/bin/mruby t.rb | |
| not found class A | |
| t.rb:11: uninitialized constant A (NameError) | |
| $ ./tmp/mruby/bin/mruby t2.rb | |
| OK |
This file contains hidden or 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
| $ cat Gemfile | |
| source 'http://rubygems.org' | |
| gem 'chef' | |
| gem 'berkshelf' | |
| gem 'knife-solo', :github => 'matschaffer/knife-solo' | |
| $ bundle install | |
| Updating git://github.com/matschaffer/knife-solo.git | |
| Fetching gem metadata from http://rubygems.org/........ | |
| Fetching gem metadata from http://rubygems.org/.. |
This file contains hidden or 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
| diff --git a/mrbgems/mruby-bin-mirb/mrbgem.rake b/mrbgems/mruby-bin-mirb/mrbgem.rake | |
| index fd0b202..0cc9bb1 100644 | |
| --- a/mrbgems/mruby-bin-mirb/mrbgem.rake | |
| +++ b/mrbgems/mruby-bin-mirb/mrbgem.rake | |
| @@ -2,4 +2,11 @@ MRuby::Gem::Specification.new('mruby-bin-mirb') do |spec| | |
| spec.license = 'MIT' | |
| spec.authors = 'mruby developers' | |
| spec.bins = %w(mirb) | |
| + | |
| + if MRuby::Build.current && MRuby::Build.current.name == "host" |
This file contains hidden or 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
| (gdb) run t4.rb | |
| Starting program: /home/yumiyama/work/mruby/mruby/bin/mruby t4.rb | |
| t4.rb:6: expected String (TypeError) | |
| "done." | |
| Program received signal SIGSEGV, Segmentation fault. | |
| 0x00007ffff77f1201 in EVP_MD_CTX_cleanup () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 | |
| (gdb) bt | |
| #0 0x00007ffff77f1201 in EVP_MD_CTX_cleanup () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 | |
| #1 0x00007ffff777265d in HMAC_CTX_cleanup () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 |
NewerOlder