Skip to content

Instantly share code, notes, and snippets.

require 'resolv'
hostname = "google.com"
puts hostname + ":"
resolvr = Resolv.new
ip = resolvr.getaddress hostname
puts " ip: #{ip}"
-module(funs).
-export([foo/0]).
foo() ->
X = 2,
Foo = fun(X) -> X + 1 end.
-module(xplane).
-compile(export_all).
start() ->
{ok, Socket} = gen_udp:open(48000,[binary]),
%receive
% after 1000 ->
% control_throttle(Socket)
%end,
# $Id: dns_cache.rb 5040 2007-10-05 17:31:04Z francis $
#
#
require 'rubygems'
require 'eventmachine'
require 'resolv'
module EventMachine
require 'rubygems'
target = ARGV[0]
puts "Searching for gems that depend on: #{target}"
Gem.searcher.find_all("*").each do |g|
g.dependencies.each do |dep|
if dep.name.include? target
p [g.name, g.version.version]
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
def insert(keyspace, key, column_path, value, timestamp, consistency_level)
send_insert(keyspace, key, column_path, value, timestamp, consistency_level)
recv_insert()
end
def send_insert(keyspace, key, column_path, value, timestamp, consistency_level)
send_message('insert', Insert_args, :keyspace => keyspace, :key => key, :column_path => column_path, :value => value, :timestamp => timestamp, :consistency_level => consistency_level)
end
def recv_insert()
$stdout.sync = true
cmd = ARGV.join " "
puts "going to execute: #{cmd}"
puts "note: I'll retry the command endlessly, regardless of exit status."
puts "I will, however, wait 5 seconds before restarting to give you time"
puts "to kill me and not my subprocess"
loop do
system cmd
diff -u -r a/configure b/configure
--- a/configure 2009-01-26 14:10:42.000000000 -0500
+++ b/configure 2009-01-26 10:21:29.000000000 -0500
@@ -9,9 +9,9 @@
BJAM=""
TOOLSET=""
-BJAM_CONFIG=""
+BJAM_CONFIG="architecture=x86 address-model=64 --layout=system"
BUILD=""
require 'rubygems'
require 'eventmachine'
require 'fcntl'
#$stderr.sync = true
#$stdout.sync = true
#
$r,$w=IO::pipe
$stderr.reopen $w