This file contains 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
% cat ../ohlol.json |ruby -I ../lib/ jgrep -s data.*.parameters | |
[ | |
[ | |
{ | |
"time_server": "time.mit.edu" | |
}, | |
{ | |
"time_server": "time.stanford.edu" | |
} | |
] |
This file contains 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 'jgrep.rb' | |
a = JGrep::JGrep.new | |
a.expression = "foo=bar" | |
puts a.match_value('{"foo":"bar"}') | |
a.value = {"foo" => "bar"} | |
puts a.match_expression("foo=bar") |
This file contains 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
#include <stdio.h> | |
#include <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
int main(void) { | |
lua_State *L = lua_open(); | |
luaL_openlibs(L); | |
luaL_loadfile(L, "host.lua"); | |
lua_pcall(L, 0, 0, 0); |
This file contains 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
hostname = os.execute("hostname") |
This file contains 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 MCollective | |
class Generator | |
attr_accessor :container, :iwindow, :dwindow, :owindow, :plugin | |
def initialize | |
@plugin = {:actions => [], :metadata => {}} | |
@container = Curses::Window.new(Curses.lines, Curses.cols, 0, 0) | |
@iwindow = Curses::Window.new(Curses.lines - 2, Curses.cols / 2, 1,0) | |
@dwindow = Curses::Window.new(Curses.lines - 2, Curses.cols / 2, 1, Curses.cols / 2) | |
@owindow = Curses::Window.new(1, Curses.cols, Curses.lines - 1, 0) |
This file contains 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
Summary of All Collectives: | |
mcollective : 10 | |
subdev2 : 7 | |
subdev1 : 3 |
This file contains 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 MCollective | |
class Aggregate | |
class Outliers<Base | |
def startup_hook | |
result[:value] = {:high => [], :low =>[]} | |
result[:type] = :collection | |
@aggregate_format = "%s : %s" unless @aggregate_format | |
@data_set = [] |
This file contains 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
/* Check if foo is present in an array */ | |
/* General language functions */ | |
#import “stdlib” | |
func main: argv { | |
list = [‘foo’, ‘bar’, baz’]; | |
return find_value(list, ‘baz’); | |
} | |
func find_value: list, value{ |
This file contains 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
Smart Array P212 in Slot 1 | |
Bus Interface: PCI | |
Slot: 1 | |
Serial Number: PACCPID1130064H | |
Cache Serial Number: PACCQID1140110N | |
RAID 6 (ADG) Status: Disabled | |
Controller Status: OK | |
Chassis Slot: | |
Hardware Revision: Rev C | |
Firmware Version: 5.12 |
This file contains 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
class ThreadsafeQueue | |
require 'thread' | |
require 'timeout' | |
def initialize | |
@queue = [] | |
@mutex = Mutex.new | |
@cv = ConditionVariable.new | |
end |
OlderNewer