Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Terminal-based Twitter Client with Streaming API support. Only supports Ruby 1.9 and later.
Homepage: https://github.com/jugyo/earthquake
Twitter: http://twitter.com/earthquakegem
Changelog'd: earthquake: Twitter terminal client with streaming API support
Demo: http://www.youtube.com/watch?v=S2KtBGrIe5c
Slide: http://www.slideshare.net/jugyo/earthquakegem
We need patches that fix the english of the documentation!
Just clone the repo and:
$ sudo docker build -t earthquake .
$ sudo docker run --rm -i -name earthquake -t earthquake
You'll need openssl and readline support with your 1.9.2. If you are using rvm you can run:
$ rvm pkg install openssl
$ rvm pkg install readline
$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr \
--with-readline-dir=$HOME/.rvm/usr
Then install the gem:
$ gem install earthquake
Ubuntu: EventMachine needs the package libssl-dev.
$ sudo apt-get install libssl-dev
$ earthquake
⚡ :help
⚡ Hello World!
⚡ $xx
$xx is the alias of tweet id.
⚡ $xx hi!
⚡ :delete $xx
⚡ :retweet $xx
⚡ :recent
⚡ :recent jugyo
⚡ :recent yugui/ruby-committers
⚡ :search #ruby
⚡ :eval Time.now
⚡ :exit
⚡ :reconnect
⚡ :restart
⚡ :thread $xx
⚡ :plugin_install https://gist.github.com/899506
⚡ :alias :rt :retweet
⚡ :update[ENTER]
[input EOF (e.g. Ctrl+D) at the last]
⚡
⚡
⚡
⚡
^D
# permanently
⚡ :eval config[:raw_text] = true
# temporarily(with :status, :recent or :thread etc...)
⚡ :aa :status $aa
# keywords
⚡ :filter keyword earthquakegem twitter
# users
⚡ :filter user jugyo matsuu
# return to normal user stream
⚡ :filter off
# All config
⚡ :config
# config for :key
⚡ :config key
# set config for :key to (evaluated) value
⚡ :config key 1 + 1
{
:key => 2
}
⚡ :config key {foo: 1, bar: 2}
{
:key => {
:foo => 1,
:bar => 2
}
}
# merge new config if both are Hash
⚡ :config key {bar: 3}
{
:key => {
:foo => 1,
:bar => 3
}
}
And more!
The default earthquake directory is ~/.earthquake.
The config file is ~/.earthquake/config.
You can change the directory at launch by entering a directory as an argument. For example:
$ earthquake ~/.earthquake_foo
# ~/.earthquake/config
# For example, to exclude blue:
Earthquake.config[:colors] = (31..36).to_a - [34]
# ~/.earthquake/config
Earthquake.config[:color] = {
:info => 34,
:notice => 41,
:event => 46,
:url => [4, 34]
}
# ~/.earthquake/config
Earthquake.config[:api] = {
:method => 'POST',
:host => 'stream.twitter.com',
:path => '/1/statuses/filter.json',
:ssl => true,
:filters => %w(Twitter Earthquake)
}
# ~/.earthquake/config
Earthquake.config[:api] = {
:method => 'POST',
:host => 'stream.twitter.com',
:path => '/1/statuses/filter.json',
:ssl => true,
:params => {
:follow => '6253282,183709371' # @twitterapi @sitestreams
}
}
# ~/.earthquake/config
Earthquake.alias_command :rt, :retweet
# ~/.earthquake/config
Earthquake.config[:confirm_type] = :n
Please set environment variable http_proxy if you want earthquake to use an http proxy.
To enable desktop notifications, install one of the following:
Call Earthquake.notify for desktop notification. You can try it by using the :eval command:
⚡ :eval notify 'Hello World!'
See https://github.com/jugyo/earthquake/wiki
~/.earthquake/plugin is the directory for plugins. At launch, Earthquake tries to load files under this directory. The block that is specified for Earthquake.init will be reloaded at any command line input.
Earthquake.init do
command :foo do
puts "foo!"
end
end
Earthquake.init do
command :hi do |m|
puts "Hi #{m[1]}!"
end
end
'm' is a http://www.ruby-doc.org/core/classes/MatchData.html object.
Earthquake.init do
# Usage: :add 10 20
command %r|^:add (\d+)\s+(\d+)|, :as => :add do |m|
puts m[1].to_i + m[2].to_i
end
end
Earthquake.init do
output do |item|
next unless item["_stream"]
if item["text"] =~ /ruby/i
notify "#{item["user"]["screen_name"]}: #{item["text"]}"
end
end
end
Earthquake.init do
output do |item|
case item["event"]
when "favorite"
notify "[favorite] #{item["source"]["screen_name"]} => #{item["target"]["screen_name"]} : #{item["target_object"]["text"]}"
end
end
end
Earthquake.init do
output_filter do |item|
if item["_stream"] && item["text"]
item["text"] =~ /ruby/i
else
true
end
end
end
Earthquake.init do
output :tweet do |item|
next unless item["text"]
name = item["user"]["screen_name"]
puts "#{name.c(color_of(name))}: foo"
end
end
Earthquake.init do
completion do |text|
['jugyo', 'earthquake', '#eqrb'].grep(/^#{Regexp.quote(text)}/)
end
end
Copyright (c) 2011 jugyo. See LICENSE.txt for further details.
FAQs
Unknown package
We found that earthquake demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.