As you might know, I’m always working on new projects to automate my work. Call me lazy, call me smart, but the true is that I actually enjoy programming, and if helps making my life easier, it is more than welcomed
Whenever I do a new gem I try to test it on as many platforms as I can. OSX is the default development platform so usually they always work there, then I try on Gentoo, Fedora, Windows and Ubuntu.
I usually run into problems when I have to find where does Ubuntu saves the gem files and binaries. Yes, you will search pretty much everywhere but you won’t remember where the hell they are.
Since I got tired of searching every time I test something on an ubuntu VM, here is a short how-to so I won’t have to search next time.
Google Search: “can’t find gem executables in ubuntu”
or
$ sudo gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/USER/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com
As it is shown above, my Ubuntu installation saves all installed gems in ~/.gems or /var/lib/gems/1.8. Once you have the path, all you have to do is add them to your shell rc file.
In the case you use bash or zsh:
export PATH=$PATH:/var/lib/gems/1.8/bin
or, if you already have a PATH like i do just add it to the declaration
PATH=/usr/bin:......:/var/lib/gems/1.8/bin
re open your shell and EUREKA, all your gem’s executable are now in your path.
Yes, today is my b-day. Hence I decided to add a few lines in this “kind of” forgotten blog.
Lately, I being doing plenty of interesting stuff, but haven’t had the time to sit and write about those things.
Here are a few updates.
* ESearchy-NG has a few new features. (Spoke being one of them)
* EMaily is almost finished. I have started testing and I’m looking for people willing to test this buggy version. (ohhh… EMaily is an automated companion tool to send client-side emails to hundred or thousands of people in different servers using customizable templates, etc. )
* Several other researches are on my table slowly developing into interesting tools or projects.
Lately , I’ve been working on a complete refactoring of ESearchy. basically it will be ESearchy 0.2, but for now I’m hosting in it as ESearchy-ng so people can still enjoy the old version while I code the new one. I changed the syntax a lot so here is a simple example of what I currently have.
Comments, bugs and coders interested in the project are more than welcomed.
A few update to the script. Now is has percentages, “other” information field and the option of providing how many results you want back. and color output
.
Enjoy
Little script to help while surfing the web. So far it gets the username and password. I will be adding the success percentage and the possibility of limiting the search results.
Otherwise, enjoy as it is.
After many nights of searching the internez for a script capable of migrating from Drupal to Wordpress, I finally found a script for an old version of Drupal. I had to do some work in order to make it work but after a couple of hours of trial and error I managed to modified and improve to old ruby script.
Now, I have a brand new CMS which I’m still finishing some details, but I hope you find this blog better and more likable than the old one. Comments and questions are accepted.
Enjoy.
Finally, after weeks of work, the first stable Beta of ESearchy is up and running in github’s gem repository.
Esearchy is a small library capable of searching the internet for email addresses. Currently, the supported search methods are engines such as Google, Bing, Yahoo, PGP servers, GoogleGroups, Linkedin, etc , but I intend to add many more.
Also, the library searches inside .pdf, .docx, .xlsx, .pptx, asn and .txt files for emails addresses and adds them to the list of found accounts. Finally, we have support for .docs files but for now only in Windows Platforms. (For more information visit: Github .
In order to install it you simple add the repository and then install the gem, as shown below.
> gem sources -a http://gems.github.com
> gem install FreedomCoder-esearchy
Once the gem is installed, you can create a new search opening and/or use the “esearchy” CLI tool but it’s really basic so far and it does not has all of the plugins.
require 'esearchy'
ESearchy::LOG.level = ESearchy::APP #Output to the stdout.
ESearchy.create "domain.com" do |d|
d.yahoo_key = "yourAPIkeygoeshere"
d.bing_key = "yourAPIkeygoeshere"
# if you want to also look in LinkedIn
d.company_name "Company Name"
#A user is needed in order to search within Linkedin
d.linkedin_credentials "myuser@linkedin.com", "mypwd"
d.maxhits = 50
d.search
d.save_to_file "company_emails.txt"
end
If you have any comments, issues or want to submit a bug please do so on
http://github.com/FreedomCoder/esearchy/issues
Hopefully it will be useful to you.
While programming Esearchy I had to create a simple class to retrieve random user agents. You may say but why you would want something like this, and the answer is simple:
“Try to trick the search engines, so they would not block me”.
Yeah, I know this might not even works, but it’s still cool. =D
Well here it goes
Use it at your own discretion and listen to your ghost …
Well, hello again, long time since the last post. I went on vacations, work a lot and did some programming. Let’s talk abount the programming part, since it is the most interesting one.
I created a small library called “Esearchy” capable of searching the internet for email addresses. Currently, we the supported search methods are engines such as Google, Bing, Yahoo, PGP servers, GoogleGroups, etc , but I intend to add many more.
Also, the library searches inside .pdf and .txt files for emails addresses and adds them to the list of found accounts.
For now, there are two main ways of performing a search, “the ruby way”
Esearchy.create "domain.com" do |domain|
domain.maxhits = 500
domain.search
domain.clean {|e| e =~ /<|>/ }
domain.save_to_file "~/emails.txt"
end
and the more classic way in which users can create an Esearchy objetc and work on it
domain = Esearchy.new :query => "domain.com", :maxhits => 500
domain.search
domain.save_to_file "~/emails.txt"
For now , that’s it for now , but keep on tuned for more shitty code ajjajaa
Nos vemos en LocosxRails 2009 … Espero pasarla mas que bien y que a la gente le gusta la charla.





