Archive for gem

[just.few.tuts] MessQ : message queue for quickly trying any idea

Posted in Blogroll, tutorial with tags , , , , , , , , on April 30, 2013 by abhishekkr

justfewtuts.blogspot.com [3/Feb/2013]

http://justfewtuts.blogspot.in/2013/02/messq-message-queue-for-quickly-trying.html

Past some time while trying up some set-up based on Message Queue at infrastructure… needed a quick to set-up, localhost friendly, network available Message Queue service to try out ideas.
So here is Mess(age)Q(ueue). Something quickly thrown together. Would work later to get it more performance oriented, good to go with smaller projects.

@GitHub:       https://github.com/abhishekkr/messQ
@RubyGems: https://rubygems.org/gems/messQ
_________________________

A Quick Tryout

[+] Install
$ gem install messQ –no-ri –no-rdoc
[+] Start Server (starts at 0.0.0.0 on port#5566)

$ messQ –start
[+] Enqueue user-id & home value to the Queue
$ messQ -enq $USER
$ messQ –enqueue $HOME

[+] Dequeue 2 values from Queue

$ messQ -deq
$ messq –dequeue
[+] Stop Server
$ messQ –stop
_________________________

Via Code….

…click here to read full post

Advertisements

[tekwalk] foodcritic rake task ~ one that works for me

Posted in Blogroll, tutorial with tags , , , , , , on April 30, 2013 by abhishekkr

@ tekwalk.blogspot.com [3/Dec/2012]

http://tekwalk.blogspot.in/2012/12/foodcritic-rake-task-works-for-me.html

FoodCritic (a lint tool for your OpsCode Chef cookbooks)
$ gem install foodcritic –no-ri –no-rdoc

Rake Task to get the FoodCritic rolling at your cookbooks…
https://gist.github.com/abhishekkr/4078239/raw/5249d3e693330d7fc69fffb7e64d323a8e862493/gistfile1.rb

…click here to read full post

[tekwalk] [puppet] quick PuppetMaster Service Script

Posted in Uncategorized with tags , , , , , , , , , , , on July 3, 2012 by abhishekkr

tekwalk.blogspot.com [25-April-2012]

http://tekwalk.blogspot.in/2012/04/quick-puppetmaster-service-script-for.html

#!/usr/bin/env ruby
module PuppetMaster
  def self.puppetmaster_cmd
   ‘puppet master –debug –verbose’
  end
  def self.start
    puts “Starting Puppet Master in Debug+Verbose+Daemon mode logging to /var/log/puppet/a.log”
    puts “Started.” if system(“#{puppetmaster_cmd} >> /var/log/puppet/a.log”)
  end
  def self.stop
    puppet_master_ps = %x{ps aux | grep -e ‘#{puppetmaster_cmd}’ | grep -v grep}
    puppet_master_pid = puppet_master_ps.split[1]
    if system(“kill -9 #{puppet_master_pid}”)
      puts “PuppetMaster with pid:#{puppet_master_pid} has been killed.”
    else
      puts “Failure killing PuppetMaster with pid:#{puppet_master_pid}.”
    end
  end
  def self.status
    puppet_master_ps = %x{ps aux | grep -e ‘#{puppetmaster_cmd}’ | grep -v grep}
    puppet_master_pid = puppet_master_ps.split[1]
    if puppet_master_pid.nil?
      puts “No PuppetMaster found.”
    else
      puts “Running @ #{puppet_master_ps}”
    end
  end
end
case ARGV.first
when ‘start’
  PuppetMaster.start
when ‘stop’
  PuppetMaster.stop
when ‘restart’
  PuppetMaster.stop
  PuppetMaster.start
when ‘status’
  PuppetMaster.status
else
  puts <<-PMUSAGE
$service puppetmaster (start|stop|restart|status)
PMUSAGE
end

[just.few.tuts] xml-motor ~ a new non-native rubygem on new Compact XML-Parsing Algorithm

Posted in Uncategorized with tags , , , , , , , , , , on November 14, 2011 by abhishekkr

@ justfewtuts.blogspot.com

Source @ github: https://github.com/abhishekkr/rubygem_xml_motor

Gem @ RubyGem: http://rubygems.org/gems/xml-motor

Algorithm @Slideshare: http://www.slideshare.net/AbhishekKr/xmlmotor

[9-November-2011] http://justfewtuts.blogspot.com/2011/11/new-portable-algo-easy-xml-parsing.html

Easy XML Parsing using XML-Motor (currently just implemented in Ruby as a Gem)
Using a new, compact algorithm of XML Parsing

 

[12-November-2011] http://justfewtuts.blogspot.com/2011/11/xml-motor-v003-mine-xml-once-multiple.html

released v0.0.3 of xml-motor with following update: http://rubygems.org/gems/xml-motor

So, the improved way for multiple searches

[takwalk] gherkin native install error AND memory leak in cucumber with HeapOutOfMemory

Posted in Uncategorized with tags , , , , , , , , , , on August 21, 2011 by abhishekkr

@ tekwalk.blogspot.com [19/6/2011]

http://tekwalk.blogspot.com/2011/06/dev-ruby-gherkin-need-native-install.html

[dev-ruby] ‘gherkin’ need a native install AND I ported entire jruby dir

….. still a ‘gherkin’ error was there. Running ‘gem list’ showed that now I had two versions of gherkin installed…..

 

…..click here to read in detail

~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~

@ tekwalk.blogspot.com [19/6/2011]

http://tekwalk.blogspot.com/2011/06/dev-ruby-jrubyonrails-blames.html

[dev-ruby] “JRubyOnRails Blames ActiveRecord” *ing: culprit Cucumber, inspector JConsole

…..After starting Rails Server and waiting for some non-specific time, an exception started arising mentioning ActiveRecord and an Heap OutOfMemory Exception …..

…..click here to read in detail