This file contains 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
# encoding: utf-8 | |
# | |
# The Kannada dictionary file needed for this script is available here : https://github.com/alar-dict/data | |
# Download the YAML file and place it in the same directory as this script. | |
# | |
# Using this script : | |
# This script is useful in an IRB console to be used interactively. | |
# | |
# 1. Lanuch irb | |
# 2. Load this script with require 'wordalla.rb' |
This file contains 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
# Copy the contents to a file named mongoid_aliased_field.rb and drop it in the lib/ directory of your Rails app | |
# Add lib/ to autoload paths in the config/application.rb | |
# require 'mongoid_aliased_field' right after you add the lib/ to autoload path | |
# | |
# #Autoload the files in the lib directory | |
# config.autoload_paths += %W(#{config.root}/lib) | |
# | |
# # Require the mongoid_aliased_field monkey patching file explicitly | |
# require 'mongoid_aliased_field' |
This file contains 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
# encoding: utf-8 | |
def ಚಿರಕಾಲ_ಸತ್ಯವಾಣಿ_ಹೇಳು | |
puts "ಸಿರಿಗನ್ನಂಡಂ ಗೆಲ್ಗೆ" | |
end | |
def ನಮಸ್ಕಾರಾ_ಹೇಳು | |
puts "ನಮಸ್ಕಾರಾ ಗುರು.." | |
end |
This file contains 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
Copied from : http://git.rsbx.net/Documents/Git_Data_Formats.txt | |
20061001.2245 | |
Git Files Data Formats | |
====================== | |
Copyright (C) 2006 by Raymond S Brand | |
OBJECTS | |
------- |
This file contains 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
$ ./irb | |
>> def ret_str | |
>> "hello " | |
>> end | |
=> nil | |
>> @ins_var = "world" | |
=> "world" | |
>> ret_str +@ins_var | |
NoMethodError: undefined method `+@' for "world":String | |
from (irb):5 |
This file contains 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
#!/usr/bin/env ruby | |
# ************************************************************************ | |
# A simple ruby script to read the index file of any git repository | |
# and dump its contents to a file in a readable format. | |
# | |
# This is totally a study tool, written when I was trying to understand | |
# the git internals. | |
# | |
# The file strucutre specification considered is this : |
This file contains 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
I have a "users" collection with documents like this : | |
{ | |
name : "Jack" | |
group: "Group-1" | |
total : 121 | |
subScores : { | |
cat1 : 38 | |
cat2 : 42 | |
cat3 : 41 | |
} |
This file contains 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
#!/usr/bin/node | |
/** | |
* Author : Srirang (Brahmana) | |
* Blog : http://techbrahmana.blogspot.com/ | |
* Site : http://srirang.co.cc/ | |
* | |
* As it is evident this is an absolutely crude script (The output file path is hardcoded... !!!). | |
* But this works. I have tried this on the VCF files generated by a Nokia 3600 Slide backup operation. |