| Snippet ID |
Title |
|
 |
| Packages Of Snippets | | 2 | hatenabm | drawnboy |
| Hatena Bookmark AtomAPI binding for Ruby. |
| 3 | libvalidtypes | babu proof |
| User Input Validation Framework |
| 36 | motally | Motally Inc. |
| motally tracker for websites, easy to integrate |
| 8 | AjaxTree | sur max |
| Sample Rails application for Ajax based drag drop tree. |
| 28 | Useful Ruby Extensions | James Schneider |
| Various extensions to core and standard libraries. |
| 32 | Remove Strip | Amit Agarwal |
| To remove strip in column from the model |
| 40 | justin | justin stultz |
| it will be about me and my life |
| 41 | nike shoes | justin stultz |
| all about shoes |
| 46 | Simple code | Serheo Shatunov |
| Simple rails code. designless to-do list. |
| 61 | Define | Grace San Jose |
<a href="http://www.myreviewsnow.net/index.php/category/gifts-for-occasions">gifts</a> -the transfer of something without the expectation of payment.
|
| Snippets |
| 1 | hash to struct | Daniel Berger |
| A method to convert a Hash into a Struct |
| 2 | Deep Copy | Matthew Linnell |
| A deep copy mechanism used by many rubyists (I by no means claim original authorship of this one, it's just darn useful to have posted here!) |
| 3 | Fuzzy Match | Matthew Linnell |
| A (rough) fuzzy match mechanism for strings. Returns 0 <= score <= 1. |
| 6 | Parse one XML element from a file | Tom Copeland |
| Parses one XML element out of a given file |
| 5 | linecat | David Dembinski |
| Two ways to read stdin one line at a time, concatenate the results, strip the newlines, and return the results to stdout. |
| 9 | DS3C3 | David Dembinski |
| Discordian Society Super Secret Cryptographic Cypher Code |
| 11 | Randomizing an Array | Florian Groß |
| Randomizes the elements of an Array. |
| 12 | Observable attribute | Jim Menard |
| Defines attr_observable which creates reader and writer methods for a symbol and includes the Observable module if not already done so. The writer method calls the methods Observable.changed() and Observable.notify_observers(). |
| 13 | Windows Registry | Rodrigo Bermejo |
Check if a given software is installed on the local machine.
For more information about Registry manipulation look at 'win32/registry.rb'
|
| 16 | multi-dimensioned sparse array | Charles Hixson |
This multi-dimensioned sparse array is due to a discussion on comp.lang.ruby.
This snippet depends on the names.rb snippet which was submitted separately.
|
| 22 | Why the luck stiff's "Object Aorta" | Dima Sabanin |
From Why's blog:
* Lovely, Simple, Prismatic
I say it's prismatic because this little snippy marries a few of my true loves together. Allow users to edit Ruby objects in YAML using your editor of choice.
|
| 23 | VALUE-to-WCHAR | Daniel Berger |
| Converts a Ruby VALUE (string) to a WCHAR type (aka wchar_t) on the Win32 platform. |
| 24 | sym2string | Daniel Berger |
| Convert a Ruby symbol to a Ruby string within a C extension |
| 25 | SuperStruct | Hal Fulton |
It's an ordered indexable collection that
allows you to access members by accessors as
well as other features.
Like a combination of Array, Hash, Struct,
OpenStruct, and maybe one or two others. |
| 30 | Small talk like if branches | Logan Capaldo |
This is a silly exercise in madness. It adds Smalltalk like branching syntax, ie:
(1 == 1).IfTrue { puts "Ok" }
you can even do
(1 == 1).IfTrue { puts "Ok" } .IfFalse { puts "Something is wrong." }
|
| 31 | Persistant IRB Command History | Michael Granger |
Putting this snippet in your home directory's .irbrc will save the last 100 lines of history to a file, and reload it when IRB starts again.
It only works if you run IRB with the readline extension, and you may have to tweak it for non-Unix-ey platforms.
|
| 29 | Second simplest json parser in the universe | Ralph Mason |
This is a json parser for Ruby in one line. See http://www.json.org for details about json.
You can express the full parser using this one line:
null=nil; jsonobj = eval(json.gsub(/(["'])\s*:\s*(['"0-9tfn\[{])/){"#{$1}=>#{$2}"})
LIMITATION: strings with only a : and whitespace will be turned into strings of => |
| 32 | cmdwatch - repeat a command in a curses window | Steven Jenkins |
| This little script takes an interval in seconds and a command as arguments. It opens a curses window, displays the command output in the curses window, sleeps for the interval, clears the window, and repeats the command. Try 'cmdwatch 5 ping -c 1 -q rubyforge.org'. |
| 33 | Convert MD5 hash from Hex to Base64 encoding | Andres Andreu |
| This function takes a hex encoded MD5 hash and converts it to a base64 encoded representation. |
| 37 | Generic #== method | Zakaria Haris |
A Module to include that define #==, #hash and #eql?. Useful for Object that needs to be unit tested.
This is Robert Klemme solution for question in ruby-talk:103977
Please note that the #hash is not the same if the object has hash attribute because {'a' => 1}.hash != {'a' => 1}.hash |
| 44 | struct to hash | Kevin Howe |
| A method to convert a Struct into a Hash |
| 47 | Mispel | John Carter |
Searches through all defined symbols for near misses in namespace. Hopefully some of those listed will be mispelling bugs.
Usage :-
ruby -w Mispel.rb
Will run its unit tests.
ruby -rmodule1 -rmodule2 -rmodule... Mispel.rb --cache
Will create ~/.mispel_ignore, a list of known near misses in the
system and in those modules.
If you add into your script, after all require statements...
require 'Mispel'
Mispel::problem_cases
exit(1)
It will (after a long time) print out all near misses in namespace
that are not in ~/.mispel_ignore
|
| 48 | Mail List HTTP Link Extractor/Uploader | Timothy Hobbs |
| Extracts http links from a POP account, where the sender is defined, usually, as a mail list address. It creates an HTML file of the links and uploads the HTML page to your web site via FTP. |
| 49 | Web Site Indexer/Uploader | Timothy Hobbs |
| Recursively indexes all pages in your local PC web site tree based on a keyword set, creates an XML index file and uploads it to your web site. |
| 50 | Diff Mode Web Site Updater | Timothy Hobbs |
| Recursively checks the modification time/date of files in your local PC tree that have changed in the last 'X' hours and uploads them by FTP to your web site. |
| 51 | Array[Array] & Array.slice(Array) std-lib extension | Jannis Harder |
Takes a list of indices and returns the corresponding items
arrayB[arrayB] == [arrayA[arrayB[0]],arrayA[arrayB[1]],....]
Example:
["Hello","World","foo","bar","baz"][[4,0,2,3,1,3,4]]
=>["baz", "Hello", "foo", "bar", "World", "bar", "baz"]
[0,1,2,3,4,5,6,7,8,9].slice([9,5,4,3,2,1,6,5,2])
=> [9, 5, 4, 3, 2, 1, 6, 5, 2] |
| 337 | Running ruby apps using iron ruby. | Mahesh Sawaiker |
| Running ruby using iron ruby. |
| 57 | latexnotes | Logan Capaldo |
A small script I wrote that for the purposes of
taking notes that I in class and converting them to a more readable format. It allows you to use LaTeX markup for equations. It takes the input a creates a directory containing your notes transformed into (very bad, but simple) html and a series of .png's representing the output of your equation markup.
An example input file might be:
$ cat 2005-02-17
For this problem we will look at the equation
$ \displaystyle \int { 2 ^ { x } dx } $
I've gotten pretty quick at typing the markup and it looks much neater than my handwriting.
It requires RMagick, and also erb. (yes erb is overkill, but if you know LaTeX better than me you can probbaly do some cooler things with this) and latex installed on your system. Its a snippet cause its not very good.
This is public domain. |
| 56 | Wrapper Class for WM_SETTINGCHANGE | Steve Callaway |
Utility class to force a WM_SETTINGCHANGE message.
Example usage: To force the Win32 environment variables set with (for example) setx.exe to be immediately available to top level windows without need for a reboot. |
| 67 | Lists methods of objects in IRB | Assaph Mehr |
Gives a quick list of an objects methods.
Useful in IRB and breakpoint. Just put this in your ~/.irbrc |
| 68 | dynamic hash-tree | Harro L |
| This component stores objects in a tree structure, creating nodes automatically when needed. |
| 69 | objdump wrapper | jason mclaughlin |
This is a ruby script that formats the output of objdump to aid in reverse engineering a program.
It will label all functions, calls to functions, addresses a function is called from, addresses code is jumped from, references to string literals, and system calls.
It was inspired by a similar but less capable Perl script.
Sorry it's not very efficient, it was my first attempt at coding Ruby, and object oriented programming too.
|
| 70 | MemoryProfile.rb | John Carter |
On exit reports on memory hotspots.
Save it as MemoryProfile.rb
then run your code like so...
ruby -w -r MemoryProfile.rb your_code.rb
Yip, it's that easy |
| 75 | cdrpgsql.cgi | Balwinder S Dheeman |
| To view Asterisk's call detail records from PGSQL database via web. |
| 78 | RingBuffer | Dirk Detering |
A ring buffer class.
Once initialised with a specific size, every 'push' adds to the end of the buffer, while dropping the first element if size was exceeded.
|
| 80 | mini test (simple unit tester) | meinrad recheis |
a really simple but nice testing utility. of course it includes its own unit test.
setting up a testcase for your module is really simple. for example the following test case tests the reverse method of String:
require "minitest"
test("testing String#reverse"){
"henon".reverse=="noneh"
}
when running the test you will get:
testing String#reverse
OK
have fun!
|
| 76 | cdrfile.cgi | Balwinder S Dheeman |
To view Asterisk's call detail records from CSV file via web.
|
| 81 | CoReturn | Scott Bronson |
| If a function returns via coreturn, execution resumes at the coreturn statement rather than starting over at the top. |
| 82 | PriorityQueue | Joel VanderWerf |
Maintain a threadsafe priority queue. Priority is assigned when pushing. Pop removes the highest priority element.
Requires rbqueue. Includes test. |
| 88 | MyVars | Devin Mullins |
| Prints local, instance, and class variables. Useful in an irb or ruby/breakpoint debugging session. |
| 93 | Instant Intent | Chiaro Scuro |
These poor man's "testing" functions allow you to express the intent of a piece of code and later run a reality check against it.
example:
expect 5, (3+2)
(3+2).should_be 5
expect_exception (StandardError){
puts 5/0
}
|
| 94 | RUDL :undefined function fixed | olamide bakre |
| This fix the problem with RUDL.so when it looks for the print_centered function, it will not crash |
| 95 | Duplicate PHP's print_r function | Kevin Baird |
| Adds a print_r method to Object. Useful for debugging. Reconfigures itself for either Ruby1.6 or 1.8 as needed. |
| 99 | Ruby code to fill in unmatched braces | Kaushik Ghose |
| BibTeX can be screwed up by an unmatched number of braces appearing in the value of a field. This code goes through a string and inserts opening braces (when it finds an unmatched closing brace) or closing braces (cumulated at the end) to the string. |
| 101 | Tiny Encryption Algorithm | Jeremy Hinegardner |
This is a pure ruby implementation of the Tiny Encryption Algorithm (TEA) by David Wheeler and Roger Needham of the Cambridge Computer
Laboratory. |
| 103 | Ruby Chat Server | Christopher Kruse |
| Runs a Chat Server on port 7680. Fairly basic, works with telnet to send/receive. Start to a project I'm thinking about doing over the summer. |
| 108 | String XOR | Dag Odenhall |
Allows to XOR together two strings. The main reason for doing so is for simple encryption.
"foo" ^ "xy" #=> "\036\026\027"
"\036\026\027" ^ "xy" #=> "foo"
Note that
"\000\000\000" ^ "key" #=> "key"
as a result of how XOR works. |
| 109 | QuickSort | Steve Shuer |
| a pure ruby quicksort implementation |
| 113 | Simple Actions for Rails Controllers | Christian Romney |
| DRY up controllers by metaprogramming empty action definitions to preserve the ability to use layouts. |
| 112 | SHOUTcast Stream Saver | Leonardo Guilherme de Freitas |
Save streams of shoutcast radios with song title.
Songs will be saved in the script directory. |
| 114 | assert_change/assert_no_change | Matthew Abonyi |
| Asserts that what is returned by an object's method has or has not changed. Inspired by assert_difference/assert_no_difference. |
| 116 | Simple Encryption | David Love |
| This class allows you to encrypt strings using Rinjdael encryption routine provided in the ruby crypt library (http://crypt.rubyforge.org/installation.html). The encrypted string can also be passed in the url. |
| 117 | WEBrick Reverse Proxy Server | Richard Kernahan |
The reverse proxy server allows webrick to proxy one or more private servers.
For example, the URL /pear/index.html could be redirected to http://localhost:8081/pear-app/index.html while all other paths not matching the /^pear/ pattern are served normally. |
| 120 | SRK/T calculation | Luke Herbert |
| Command line script for working out IOL power given K readings, axial length and a-constant. Offered with no promise of accuracy for the interested ophthalmologist to play with (eg cross checking stuff for audit) - not for clinical use. New to ruby - style probably aweful! |
| 123 | KELKO::DATA::Tree | kelko |
a simple "tree":
- nodes (being named) have multiple nodes or leaves
- leaves have also names
- the tree is "hold" on the root node
a node (means the whole tree also) can be 'collapsed'
- means all nodes without other nodes and leaves are deleted
- if the parent-node is 'empty' afterwards as well it is deleted also
- only the root-node is never deleted
inner nodes may have leafs also, not only outer nodes |
| 124 | KELKO::DATA::BstarTree | kelko |
| an implementation of a so-called B*-Tree |
| 125 | KELKO::DATA::Buffer | kelko |
| a small buffer |
| 126 | KELKO::TOOLS::PWgen | kelko |
| a generator for random 'passwords' |
| 127 | KELKO::DATA::Queue | kelko |
| a simple queue implemented using an array |
| 131 | Pulling random elements from an array | Brian Ewell |
| Returns a random element from the receiving array, either destructively or non-destructively. |
| 132 | acts_as_google_account | Fidel Santiago |
| This is a acts_as RoR plugin for validating a username and password against Google. |
| 133 | Generate and return an array of random numbers | Steve Callaway |
This is an example of how to generate & return an array of random numbers, of a given length, wihtin a set range. It may or may not generate duplicates. It makes some simplistic assumptions about how to handle 0 length arrays, or issues where the high and low bound are equal etc. which can simply be recoded to fit your needs.
Arguments:
low - low bound of random number
high - high bound of random number
elements - number of elements to populate
|
| 134 | Encode in Adobe Base85 format | Riccardo Bernardini |
| The function ascii85encode takes an array of bytes or a string and returns a string rappresenting the array in the Adobe Base85 encoding format (see PDF reference manual) |
| 139 | Truncate Text | arnel labarda |
| Truncate Text |
| 138 | load_tester | Gene Rogers |
| load_tester is a simple ruby script to stress test a web-server. It uses threads to simulate multiple concurrent connections and is able to authenticate via SSL if a Client Certificate is provided. |
| 142 | Extract email address from Yahoo/Gmail email form | Nasir Khan |
Often you copy email addresses from one email program to other. Just now I copied some email addresses from Yahoo to Outlook. One way to do that is to export the address book and import in your favorite email sofwtare.
Sometimes however, you just need to copy without importing. Most of the email programs display emails in the format "John Smith<john.smith@somewhere.com>, Jane Smith<jane.smith@somewhere.com>" and you would like to just extract email address minus all the fluff.
As an example type in some email addresses in your Yahoo compose email form. [These days "Ajax suggest" helps to do it faster than looking through address book], then copy the string and use the script below to extract just the addresses. This is extremely simple. |
| 145 | Simplest option parser | Keith Hodges |
| When I just want the simplest of command line options this is what I use |
| 146 | SingleLogger | Dov Murik |
| Singleton logger (instead of global $logger or passing the logger variable to every function). |
| 147 | Derives From | James Randall |
A handy little script when learning a new library (or Ruby core) that when given the name of a class will tell you all the classes that are derived from it. For example:
ruby derives_from.rb StandardError
Will tell you all the classes that derive from StandardError. Additionally you can specify libraries to load and search. For example the following loads the wxRuby2 library and looks for all derivatives of the Window class:
ruby derives_from.rb Wxruby2::Window wx
The script relies on the fact that class definitions are objects like any other and so end up in the ObjectSpace after a library has been requires. |
| 148 | Simple JSON parser & builder | Chihiro Ito |
This code snippet contains two simple JSON processing classes. JsonParser converts a JSON string to an array or a hash. JsonBuilder performs vice versa. These classes are standard compliant and are designed for stability and reliability. Especially JsonParser has UTF-8 validation functionality so you can avoid some kind of security attack.
For details, you can generate a document by RDoc.
rdoc SimpleJson.rb
|
| 149 | Nmap Grepable Output Parsing | Manish Saindane |
This script parses the nmap grepable output file and lists the following info for all ips:
Hosts IP
Requested ports(open, filtered or closed)
|
| 156 | Array.which_long? | Billy Hsu |
| It will be return the longest item of the array. |
| 157 | Array.which_long? | Billy Hsu |
Same as the version 1.
Usage:
puts [1, 12, '123'].which_long?
=> 123 |
| 158 | Service Control | Brian Sanders |
| Small ruby module which taps into advapi32 to provide an interface to the functions which allow you to start, stop, pause, and query Windows services. I prefer this over using net start/stop. |
| 159 | Array.longest | Billy Hsu |
Usage:
[1, 23, 456, '123'].longest
#=> [456, '123']
Better than Array.which_long? |
| 250 | Kautz graph explorer | Markus Liedl |
| Script to visualize Kautz graphs using gtk2 and cairo. |
| 252 | Autotest with iChat | Philip Matarese |
An example of a .autotest file that will broadcast your current test state via chat status.
Requires rubyosa and of course ZenTest. Also requires images named rails_ok.png, rails_fail.png, rails_pending.png, and rails_chillin.png. |
| 251 | Simple Container Dump Using STL Iterators | Stephen Doyle |
Quick and dirty printing of containers contents in C++ using STL ostream_iterator. Useful for dumping the contents of a container to a log file etc.
|
| 263 | Ruby thumbnail generator | Stefan Vantroba |
Ruby thumbnail generator is simple script which is ideal to use in your Ruby on Rails application to quickly generate thumbnails of any proportions. Just set width and height and get image. It uses GD2 library and stores resized images in the cache to save processing time in next request. Visit: http://www.cleverleap.com/ruby-thumbnail-generator/
for more detail information and installation instructions. |
| 270 | Broadsoft Ruby Gem Example | Thomas Howe |
| An example of using the Broadsoft Gem |
| 264 | Random string generator | Gunnar Wolf |
| Modify the base String class to allow for random strings of any length to be easily generated. This can be useful for generating password salt values, confirmation URLs, or even for generating passwords |
| 255 | Send Email through Qmail | Andreas Junizar |
Must have qmail-inject in Linux/UNIX.
You will be able to send email through qmail.
Simple!!
This function is only to send email. No other than that. |
| 265 | IronRuby Example | Matthew Miller |
This uses IronRuby to generate a runtime compiled assembly in .NET, and executes it. The example Ruby code uses its .NET resources to generate a form.
Full access to the CLR using IronRuby I believe. Correct me if I'm wrong.
A must have for .NET/Ruby junkies!!!
Source Obtained from http://www.iunknown.com/2007/07/a-first-look-at.html
|
| 283 | minirb | Tomokiyo Nomura |
| An ultra short irb-like script. Type ruby expression on the command line to display return value. Type only ';' to enter the multiline input mode. Type only ';' on the command line to exit the multiline input mode. Type 'exit' to exit the program. |
| 420 | count_seconds | peter bauer |
| A small example for using Tk.after to count and display seconds. |
| 267 | Generic Mapper | Matt Mitchell |
| This module will provide 2 methods - map and map!. It allows you to create a set of "rules" that define what single value gets returned from map!. The result depends on the order that the "rules" are defined. |
| 185 | palindrome | naresh cheruku |
A word that reads the same in either direction, forward or backward.
For example:- The word MOM is palindrome.
RUN is not |
| 274 | dial_jajah.rb - make a phone call | peter bauer |
Make a phone call with the jajah provider from the Command Line. You can also check your balcance and set the number of origin. Jajah already has a web interface but maybe you don't like it or you need to automate your phone calls.
A jajah account (userid and pin) is required. |
| 469 | deltacloud | chad palmer |
| deltacloud core |
| 195 | sip_clip.rb | peter bauer |
Get the "Caller ID" or CLIP information
out of a SIP VoIP incoming Telephone call.
-Display the "Caller ID" on your TV
equipped with enigma based SAT Reveiver.
Requires a free Ethernet Port on a Linux Box and the possibility to sniff VOIP traffic
(You can use a HUB to "mirror" traffic) |
| 199 | Class accessors | Jared Cooke |
| Defines a set of macros to create accessor methods for class variables. Operates in the same function as Ruby's instance variable accessors |
| 200 | Windows rss wallpaper changer | Bela Babik |
| first cut, will be updated |
| 257 | findcs | Pranay Kanwar |
Locates Counter Strike servers on LAN, prints
information such as, IP, map, players, etc.
|
| 268 | Config - DSL | Matt Mitchell |
| A hash configuration generator using a dsl looking syntax. |
| 472 | 4l4y Converter | \x00 null |
| SMS Language style in indonesia. |
| 319 | sdk | jet adlawan |
| ping box |
| 258 | rconcs | Pranay Kanwar |
Rcon ruby console for Counter-Strike Server
administration, with readline support. |
| 269 | Form validation | Shlomi Elbaz |
| Form validation |
| 259 | justAnEcho | bachkoutou bachkoutou |
| justAnEcho |
| 288 | English-like password generator | nor ton |
| This code generates English-like (or any language really) passwords based on a dictionary you provide. |
| 468 | Want to purchase anyFORDCAR | vivek lohia |
Are u interested to buy any FORD car? Please be free to contact me. As i will help u to get the car in the most competative rates(sarkar00ss299) Email: vivekkumarlohia@yahoo.in Contact Number: +91-9714501031
|
| 278 | Post Current iTunes Album to Twitter | Drew Schimmel |
This ruby script will automatically update your Twitter account when you start listening to a new album in iTunes on a Mac. It doesn't send updates for every song, for obvious reasons, and requires the rbosa and twitter4r gems or libraries for ruby. The easiest way to install these on any recent Mac is to open a terminal window and type 'sudo gem install rubyosa' and 'sudo gem install twitter4r'
The script takes two command-line arguments, your Twitter username and password.
So, for example: 'ruby itunes_twitter.rb myusername mypassword'
To run as a background process, simply use 'ruby itunes_twitter.rb myusername mypassword &' instead. |
| 289 | Recipe site script | David Lin |
| A great PHP recipe script, allowing you to effortlessly create your own recipe website. With over 40,000 recipes, an admin panel, and built in adsense, this script should be checked out today! |
| 261 | WillPaginate - PostFormLinkRenderer | James Randall |
A link rendered for WillPaginate that allows for the posting of a form and the setting of the page number in a hidden form tag (with the same name as the param_name specified). The form must have an id of form.
It was useful to me as I had two different pages results and a good deal of surrounding form data that needed to be held within a single form. |
| 279 | Send Multicast data | Alan Davies |
| Sample ruby code to send multicast data |
| 290 | dreambox_msg | peter bauer |
Send Popup message to Dreambox DM7000 or other enigma based SAT receiver ( Please adjust IP-Address inside script)
>date | dreambox_msg will show a popup with
current date
|
| 280 | Receive multicast data | Alan Davies |
| Sample code to receive multicast data |
| 470 | SortedArray | Sergey Chernov |
| Array extended to sort elements on tha fly (when inserting) and provides very effective binary search for elements. The rest of Array magick shold work as usual. |
| 248 | Interactive Alphabetizer-Super Simple | Joe Ganz |
This is so simple it shouldn't even be here. Most of you probably already know this if you read Learn to Program by Chris Pine.
You just type in several words, with Enter in between them, and then when you press Enter on a blank line it gives you back the words alphabetized.
Small note on the first line of this snippet: you could also use Array.new, but the Array literals, [], are shorter. |
| 249 | Method to determine probability of calling a Proc | Joe Ganz |
Uses the method maybe_do to pass in a Proc, and the probability to call the Proc.
USAGE: In your program, write maybe_do then the Proc you want to call, followed by a comma and the probability that it should happen (integer between 0-100). If you use a negative integer or a number > 100, it will just not do anything. |
| 311 | Numeros_Palabras | Powerpuff Kuma |
| Un traducción desde PHP de la paquete Number_Words del proyecto PEAR (http://pear.php.net/package/Numbers_Words) para traducir números y cifras a palabras |
| 346 | primitive.rb - easy definition of simple classes | Fabian Streitel |
This is primitive.rb, a small function that let's you define a class that is only intended to hold certain attributes with one line of code:
primitive :Klass, [:attr1, :attr2]
in any module. |
| 379 | Whois | |
| How to implement whois on the most basic level. |
| 471 | Multiple key Hash getter/setter | Sergey Chernov |
| Inpired by python. Allow to access more than one key in the hash in the single index accessor |
| 474 | dreambox_msg.py | peter bauer |
| send popup message to TV with enigma based sat receiver, see also ruby section for a script written in ruby |
| 475 | RUBY Constant Update (ruby_const_update.rb) | Dan Rathbun |
Updates older Ruby versions to have constants
like 1.8.7 and 1.9.x, specifically:
RUBY_COPYRIGHT, RUBY_DESCRIPTION and
RUBY_PATCHLEVEL if less than ver 1.8.5-p12 |
| 476 | TextTable | John Allen |
Prints data in a text format in a terminal session. Very useful for displaying debug info or tabular data inside a session. Simply setup the table hash to define column headers and sizes, and then just call a method to print a row of data. It will also multi-line wrap data, or chop depending on the wordwrap option set in the table hash.
More info at http://johnallen.us/?p=347 |
| 440 | File Appender | Jacob Yates |
It will append itself to any ruby file in the current directory, and will not append if they have a CCiC marker.
This Could Be Used For A Bases Of A Simple Appender Virus |
| 450 | Ruby text editor | Michael Lenox |
| Ruby Editor Program, a basic CLI text editor |
| 452 | Utiliser Anydbm dans python | Jean Tinguely Awais |
| Emploie de Anydbm en python. Utiliser la base de donnée pour stocker des clés, valeurs. |
| 478 | ManageUsers | Kyle Carter |
| This class, i.e. ManageUsers, provides termination and provisioning functionality pertaining to active directory. |
| 441 | File Prepender | Jacob Yates |
| Pretty much same as appender, but ofcourse prepends to the file |
| 480 | clip_listen.py | peter bauer |
Small tcp server which saves data from socket to a file.
Can be used to save CLIP Data from a SIP call to a call log file. Only supports a single session. |
| 373 | Improved Open Struct | David M |
This class provides a few new capabilities in addition to what is provided by the OpenStruct class.
The method _to_hash will return a hash representation of the struct, including nested structs.
The method _table will return a hash representation, but will not resolve any nested structs.
The method _manual_set takes a hash and adds it to the struct. This is similar to OpenStruct's ability to take a hash as an initial argument to create a struct, this method allows the struct to be modifed post instantiation.
The method names start with an _ (underscore) to avoid any conflicts between these methods and struct assignments.
Implementation note: I created a new class rather than extending the existing OpenStruct class due to my personal preference of not changing the behavior for standard library classes. However, one could just as easily extend the OpenStruct class with these behaviors as well. |
| 442 | File EPO(Entery Point Obscuring) | Jacob Yates |
| It finds a ruby file without the CCiC marker and places code in the middle of host code |
| 454 | Test sur la sérialisation par Yaml | Jean Tinguely Awais |
| Un petit script qui test la sérialisation d'objets avec YAML. Il fait aussi appel à la classe test/unit pour obtenir les informations de test |
| 482 | String shuffle | ruy jauregui |
String class extension.
These methods shuffles the characters in a string. If used alone, independent characters are shuffled, if used with arg, sets of arg characters are shuffled.
Depends on Ruby >= 1.9 |
| 483 | .gitignore | Andrew Bell |
| Sample .gitignore file |
| 498 | How to create executable files in ruby on rails | yedukondala reddy |
I know the rubyscript2exe, ocra but I don't know the procedure to develop .exe file
Please give the sugessions any one?
Thak you |
| 501 | BinaryDecimalConverter | Lars Nielsen |
| A small script to convert Binary to Decimal and the otherway arround |
| 399 | life-meter | Michael Lenox |
| A program to determine lifetime as a percentage. It is not very interesting, but it demonstrates ruby's input/output and logic meathods. |
| 402 | Login | Michael Lenox |
| Ruby Login Program, a program to play with strings, blocks, and if statements |
| 455 | Test sur les procs et blocs | Jean Tinguely Awais |
| Petit test sur les procs et les blocs avec ruby |
| 409 | svn conflicts resolver | Fernando Giannetti |
Resolves all the svn conflicts of the file taking allways the newest version as correct.
Requires svn |
| 410 | MD5 compare with Virustotal | Rishi Narang |
| Inputs MD5 from a text file, and validates against the malware hash at Virustotal. |
| 456 | Test sur les tableaux | Jean Tinguely Awais |
| Test sur les arrays et les appels de fonction |
| 514 | helloworld.py | green8 Jim |
| Python |
| 565 | popup_tk.pl | peter bauer |
| program which shows a message for some seconds on the screen. Requires perl/tk |
| 532 | hello_buttons | peter bauer |
| Create programmable Buttons with TKInter |
| 548 | emporio armani watches | jucy huang |
| Emporio Armani watches, Armani watches for sale, Armani watches online shop offer latest ladies and mens watches at discount prices with fast delivery. 40%-60% off. |
| 549 | armani exchange watches | jucy huang |
| The <a href="http://www.armaniwatchessales.com/">emporio armani watches</a> range has always been a fashion hit.From casual attire to evening wear, the Armani Men Ceramic watches are the huge section of a true man's wardrobe.Giorgio Armani established fact for his sense of style and fashion plus it shows as part of his <a href="http://www.armaniwatchesales.com/armani-mens-watches">Armani mens Watches</a> at the same time.Armani watches ensure that you get that casual sophistication that Armani is known for in addition to quality craftsmanship you can depend on.These are merely a number of the many choices of <a href="http://www.armaniwatchesales.com/armani-ladies-watches">armani womens watches</a> available.A lot of women wish to boast the armani watches as an eccentric of a wristwatch |
| 550 | emporio armani watches | jucy huang |
The [url=http://www.armaniwatchessales.com/]emporio armani watches[/url] range has always been a fashion hit.From casual attire to evening wear, the [url=http://www.armaniwatchesales.com/armani-men-ceramic-watches]Armani Men Ceramic watches[/url] are the huge section of a true man's wardrobe.Giorgio Armani established fact for his sense of style and fashion plus it shows as part of his [url=http://www.armaniwatchesales.com/armani-mens-watches]Armani mens Watches[/url] at the same time.Armani watches ensure that you get that casual sophistication that Armani is known for in addition to quality craftsmanship you can depend on.These are merely a number of the many choices of [url=http://www.armaniwatchesales.com/armani-ladies-watches]armani womens watches[/url] available.A lot of women wish to boast the armani watches as an eccentric of a wristwatch
|
| 551 | armani watches for women | jucy huang |
| Emporio Armani watches, Armani watches for sale, Armani watches online shop offer latest ladies and mens watches at discount prices with fast delivery. 40%-60% off.http://www.armaniwatchesales.com/ |
| 554 | armani watches | david huang |
| Limited Time Promotion: 50%-70% OFF now! From Emporio Armani Watches UK Online Shop, we offer latest men and ladies armani watches with free and fast delivery world wide.http://www.armaniwatches.uk.net/ |
| 564 | clip_listen.pl | peter bauer |
| small TCP server programm which listens for incoming phone numbers |
| 571 | They've already black faces with white dials | tongy aixin |
| A timepiece from your sports series typically have metal bracelets made from solid chromium steel. They've already black faces with white dials, also it glows at night, making it simpler to tell time even during poor lighting conditions.[url=http://www.armaniwatcheswebs.co.uk/armani-couple-watches]armani couple watches[/url] |