Top-rated recipes tagged "ironruby"http://code.activestate.com/recipes/tags/ironruby/top/2012-11-21T11:05:20-08:00ActiveState Code RecipesPlaying with GDI+ (brushes) (Ruby)
2012-11-21T11:05:20-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578346-playing-with-gdi-brushes/
<p style="color: grey">
Ruby
recipe 578346
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/gdiplus/">gdiplus</a>, <a href="/recipes/tags/ironruby/">ironruby</a>).
</p>
<p>Just for fun. Enjoy!</p>
Loaded assemblies (Ruby)
2012-11-19T08:53:23-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578341-loaded-assemblies/
<p style="color: grey">
Ruby
recipe 578341
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/assemblies/">assemblies</a>, <a href="/recipes/tags/ironruby/">ironruby</a>).
</p>
<p>Sometimes (working with IronRuby with interactive mode) it's very useful to know what assemblies was loaded. This sample shows how to do it.</p>
Retrieve codecs (Ruby)
2012-11-19T08:49:26-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578340-retrieve-codecs/
<p style="color: grey">
Ruby
recipe 578340
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/codecs/">codecs</a>, <a href="/recipes/tags/ironruby/">ironruby</a>, <a href="/recipes/tags/registry/">registry</a>).
</p>
<p>On WinXP (there is no other Windows in my VMWare Player :) you can do it with Ruby in the next way:</p>
<p>require 'win32/registry'</p>
<p>Win32::Registry::HKEY_CLASSES_ROOT.open(
'CLSID{083863F1-70DE-11d0-BD40-00A0C911CE86}\Instance'
) do |reg|
reg.each_key do |key|
val = reg.open(key)
puts val['FriendlyName']
end
end</p>
<p>But what about extended information, aah? I'm talking about script which shows additional data such as CLSID and codec location. With IronRuby it can be done so easy.</p>
Checking hashes of files (Ruby)
2012-11-19T08:45:51-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578339-checking-hashes-of-files/
<p style="color: grey">
Ruby
recipe 578339
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/hash/">hash</a>, <a href="/recipes/tags/ironruby/">ironruby</a>, <a href="/recipes/tags/md5/">md5</a>, <a href="/recipes/tags/ripemd160/">ripemd160</a>, <a href="/recipes/tags/sha1/">sha1</a>, <a href="/recipes/tags/sha256/">sha256</a>, <a href="/recipes/tags/sha384/">sha384</a>, <a href="/recipes/tags/sha512/">sha512</a>).
</p>
<p>There is HashAlgorithm class in System.Security.Cryptography namespace which is stored into mscorlib, a core assembly of .NET Framework. So...</p>
Multidimensional arrays (Ruby)
2012-11-19T08:43:11-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578338-multidimensional-arrays/
<p style="color: grey">
Ruby
recipe 578338
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/array/">array</a>, <a href="/recipes/tags/ironruby/">ironruby</a>, <a href="/recipes/tags/multidimensional/">multidimensional</a>).
</p>
<p>The next example shows how to create rectangular and jagged arrays.</p>
Print letters with different case (Ruby)
2012-11-19T08:38:31-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578336-print-letters-with-different-case/
<p style="color: grey">
Ruby
recipe 578336
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/ironruby/">ironruby</a>, <a href="/recipes/tags/letters/">letters</a>).
</p>
<p>It seems just for fun but sometimes it very useful (for example, writing a script to generate random password).</p>
Retrieving product key with IronRuby (Ruby)
2012-11-03T18:22:01-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578320-retrieving-product-key-with-ironruby/
<p style="color: grey">
Ruby
recipe 578320
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/ironruby/">ironruby</a>, <a href="/recipes/tags/productkey/">productkey</a>).
</p>
<p>If you like <a href="http://code.activestate.com/recipes/578317-product-key/?in=lang-text">IronPython script</a> for retrieving MS products' keys then you like IronRuby analog. Maybe...</p>