This file contains hidden or 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
require 'rubygems' | |
require 'celluloid' | |
require 'celluloid/io' | |
class Look | |
include Celluloid | |
def initialize | |
@r = Celluloid::IO::DNSResolver.new | |
end | |
def up(a) |
This file contains hidden or 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
module TreeWalker | |
def children | |
res = [] | |
@childs.each do |c| | |
res += self.send(c) | |
end | |
return res | |
end | |
end |
This file contains hidden or 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
c = Customer.create(:name => "#{rand(1000)}root") | |
hc = c.host_classes.create(:name => 'web_child') | |
h = hc.hosts.create(:name => 'server1_child') | |
s = h.services.create(:name => 'ssh_child') | |
1.9.3p286 :075 > c.children | |
=> [] | |
c = Customer.create(:name => "#{rand(1000)}root") |
This file contains hidden or 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
input { | |
stdin { | |
type => "json" | |
format => "json" | |
} | |
} | |
filter { | |
date { | |
type => "json" | |
t => "yyyy-MM-dd HH:mm:ss" |
This file contains hidden or 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
input { | |
zeromq { | |
address => ['tcp://192.168.0.136:6667'] | |
format => ['json'] | |
type => 'zeromq' | |
debug => true | |
topology => "pushpull" | |
} | |
} | |
filter { |
This file contains hidden or 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
Valid json? | |
{ | |
"to": null, | |
"msg": "fuck you", | |
"command": "console_send", | |
"h": { | |
"sequence": 1, | |
"ts": 1351393625, | |
"client_id": "cfaaa1f6-be31-40ad-ab56-fddfb47c90f4", |
This file contains hidden or 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
script "RVM" do | |
interpreter 'bash' | |
flags '-l' | |
user 'vagrant' | |
code <<-EOS | |
whoami | |
if [ -f /home/vagrant/.rvm/bin/rvm ] | |
then | |
echo "RVM is installed skipping...." | |
else |
This file contains hidden or 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
PS C:\Users\jesss\Documents\Aptana Studio 3 Workspace\neodevise> jruby -S bundle exec g devise:install --orm=neo4j | |
Cannot locate Java installation, specified by JAVA_HOME: | |
δ | |
PS C:\Users\jesss\Documents\Aptana Studio 3 Workspace\neodevise> jruby -S bundle exec rails g devise:install --orm=neo4j | |
Unfortunately, a fatal error has occurred. Please see the Bundler | |
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! | |
SystemCallError: Unknown error - No message available | |
_exec_internal at org/jruby/RubyKernel.java:1658 | |
exec at file:/C:/jruby-1.7.0.RC1/lib/jruby.jar!/jruby/kernel19/kernel.rb:23 |
This file contains hidden or 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
require 'celluloid' | |
require 'ruby-prof' | |
require 'prime' | |
class MyWorker | |
include Celluloid | |
def add_one(number) | |
# roflscale computation goes here | |
number.prime_division |
This file contains hidden or 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
<html> | |
<head> | |
<link href="https://raw.github.com/novus/nvd3/master/src/nv.d3.css" rel="stylesheet" type="text/css"> | |
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script> | |
<script type="text/javascript" src="https://raw.github.com/novus/nvd3/master/lib/d3.v2.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/novus/nvd3/master/nv.d3.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/novus/nvd3/master/src/tooltip.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/novus/nvd3/master/src/models/stackedArea.js"></script> | |
<script type="text/javascript" src=""></script> |
NewerOlder