Skip to content

Instantly share code, notes, and snippets.

View prudhvi's full-sized avatar
😄

Prudhvi Dhulipalla prudhvi

😄
View GitHub Profile
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails', :branch => '4-2-stable'

Keybase proof

I hereby claim:

  • I am prudhvi on github.
  • I am prudhvi (https://keybase.io/prudhvi) on keybase.
  • I have a public key whose fingerprint is E5B0 0291 6C5F CEEA D24E CAB6 8350 BA92 A4E1 86A7

To claim this, I am signing this object:

@prudhvi
prudhvi / StringCompression.rb
Created March 27, 2011 04:02
Encodes the input string into a compressed format
puts "Please enter the string"
input = gets.chop
currentChar = input[0]
compressedString = ""
currentCharCount = 1
wordSize = input.size
count = 1
input[1..wordSize].each_char do |c|
@prudhvi
prudhvi / CommonRegex.rb
Created March 6, 2011 09:42
Regular Expression to match some common pattern/formats
emailregex = /\A\w+.\w+@\w+.com\Z/
phoneregex = /\A\d{3}-?\d{3}-?\d{4}\Z/
puts "Enter email id"
email = gets
if emailregex.match(email)
puts "Email pattern matched"
else
puts "Email format is wrong"
end
@prudhvi
prudhvi / test.rb
Created March 5, 2011 19:14
Testing posting from gist to posterous
8.times do
puts 'Hai'
end