Read file and eval it
Evaluate node require() module content directly
Read node.js file and eval it
evaluate statically-analyzable expressions
decycle your json
Mathematical expression evaluator fork with exports map, prototype pollution and code injection security fixes
Simple JavaScript expression evaluator
A flexible math expression evaluator
require or eval modules
Mark scopes for deopt which contain a direct eval call
Get callsites from the V8 stack trace API
JavaScript expression parsing and evaluation.
Alias for eval global.
Safely evaluate JavaScript (estree) expressions, sync and async.
A library for teleporting rich data to another place.
A simple cache for a few of the JS Error constructors.
Eval a string with a passed scope
ECMAScript scope analyzer for ESLint
Mathematical expression evaluator
The grunt command line interface
TypeScript execution environment and REPL for node.js, with source map support
Douglas Crawford's JSON2, ported to a CommonJS compliant module
Parse Content Security Policy directives.
Evaluates javascript code blocks from markdown files.
Guardrc allows one to have custom Guardfile commands in a different file than the Guardfile. Useful for different developers with different Guardfile preferences to be able to customize without removing/ignoring the Guardfile from git entirely.
This gem is a Ruby interface into SCAP content. It can parse SCAP datastream files (i.e. ssg-rhel7-ds.xml), scan result files output by oscap eval, and tailoring files.
Parses a hash string of the format `'{ :a => "something" }'` into an actual ruby hash object `{ a: "something" }`. This is useful when you by mistake serialize hashes and save it in database column or a text file and you want to convert them back to hashes without the security issues of executing `eval(hash_string)`. By default only following classes are allowed to be deserialized: * TrueClass * FalseClass * NilClass * Numeric * String * Array * Hash A HashParser::BadHash exception is thrown if unserializable values are present.
Parses a hash string of the format `'{ :a => "something" }'` into an actual ruby hash object `{ a: "something" }`. This is useful when you by mistake serialize hashes and save it in database column or a text file and you want to convert them back to hashes without the security issues of executing `eval(hash_string)`. By default only following classes are allowed to be deserialized: * TrueClass * FalseClass * NilClass * Numeric * String * Array * Hash A HashParser::BadHash exception is thrown if unserializable values are present.
Most existing gems that address command execution provide a limited interface or lack notable features. In contast, Exek seeks to provide comprehensive support for all of a program's exec needs with one thoughtfully-designed library. Intended features: - A "Command" class that encapsulates argv, env, and IO options, and process state. - Easy-to-use high level interfaces with sensible defaults for running commands to completion. - Comprehensive support for low-level concerns like piping, PTYs, and file descriptor magic. - Utilities for manipulating `sh` script strings, idiomatically building argument arrays, and generating reusable interaces for common system commands. - Tracing and introspection facilities for logging and latency analysis. - Safety: does not monkeypatch external modules, encourage mixins or use eval. Attempts to guide developers away from unsafe practices like shell scripts and shell injection.
* http://rubysideshow.rubyforge.org/irb_callbacks == DESCRIPTION: This gem adds callbacks to irb, intended for you to override at your discretion. == FEATURES: irb's control flow looks like this: loop: * prompt * eval * output This gem adds three callbacks to each phase. module IRB: * self.before_prompt * self.around_prompt (call yield) * self.after_prompt * self.before_eval * self.around_eval (call yield) * self.after_eval * self.before_output * self.around_output (call yield) * self.after_output == SYNOPSIS: # Here's my ~/.irbrc file (which is run at irb startup) require 'rubygems' require 'irb_callbacks' require 'benchmark' # This little snippet will time each command run via the console. module IRB def self.around_eval(&block) @timing = Benchmark.realtime do block.call end end def self.after_output puts "=> #{'%.3f' % @timing} seconds" end end # And a sample irb session: $ irb irb(main):001:0> 1_000_000.times { |x| x + 1 } => 1000000 => 0.330 seconds == CAVEATS: The three around_* callbacks all require you to call the block that's passed in. If you don't do it, undefined behavior may occur. == INSTALL: * sudo gem install irb_callbacks == LICENSE: (The MIT License) Copyright (c) 2008 Mike Judge Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# ruby unshare (runshare) This tool allows to unshare Linux namespaces. The implementation is similar to the unshare(1) tool. ## Installation Add this line to your application's Gemfile: ```ruby gem 'runshare' ``` And then execute: $ bundle Or install it yourself as: $ gem install runshare ## Usage > require "runshare" > RUnshare::unshare For example: cat > test.rb require "runshare" pid = RUnshare::unshare( :clone_newpid => true, :clone_newns => true, :clone_newcgroup => true, :clone_newipc => true, :clone_newuts => true, :clone_newnet => true, :clone_newtime => true, :fork => true, :mount_proc => "/proc", # docker export $(docker create hello-world) | tar -xf - -C rootfs :root => "/tmp/rootfs" ) if pid == 0 # child puts "--- #{Process.pid}" if system("/hello") != true raise "bad" end puts "--- done" else # parent puts "-- unshare=#{pid}, pid=#{Process.pid}" puts "-- exit=#{Process.waitpid(pid)}" end ^D sudo ruby -I ./lib ./test.rb ## Quick start $ rake compile && echo 'require "runshare"; RUnshare::unshare(:clone_newuts => true)' | irb install -c tmp/x86_64-linux/runshare/2.4.10/runshare.so lib/runshare/runshare.so cp tmp/x86_64-linux/runshare/2.4.10/runshare.so tmp/x86_64-linux/stage/lib/runshare/runshare.so Switch to inspect mode. require "runshare"; RUnshare::unshare ## Ruby <2.5 If your app is single threaded and you are observing: eval:1: warning: pthread_create failed for timer: Invalid argument, scheduling broken Just ignore it with some degree of bravity. You also can silence it by setting: $VERBOSE = nil ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/sitano/runshare. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.