Conditional load modules.
Snyk package loading system with policy detection
Wrap `require` in a try/catch block.
Transform stream to remove require calls from inside a try{} statement
NodeJS Require that let you handle module not found error without try/catch
Try to require the given module, failing loudly with default message if module does not exists.
Get stdout window width, with two fallbacks, tty and then a default.
A dictionary of file extensions and associated module loaders.
Build environment checking (a la autoconf) for node.js
`Start a promise chain
Tries to execute a function and discards any error that occurs
Keep require and import consistent after bundling or transpiling
Detect Node.JS (as opposite to browser environment). ESM modification
A replacement for process.exit that ensures stdio are fully drained before exiting.
bundle and require a file
Converts callback-based functions to ES6 Promises
This library emulates ioredis by performing all operations in-memory.
Generate massive amounts of fake contextual data
Super-fast alternative to Babel for when you can target modern JS runtimes
A browser based code editor
Middleware to destroy caching
A 373-byte Spec-Compliant Runtime-Only Implementation of the ECMAScript Try Operator Proposal Result class
Encode a URL to a percent-encoded form, excluding already-encoded sequences
Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.
= macmap Ever wanted to map your interface to an ip? If you haven't, why not? Alas, Macmap is here to help! Usage is easy: Macmap.map_iface_to_ip %{ifconfig -a} Or require "rubygems" require "popen3" Open3.popen3('ifconfig -a') { |stdin, stdout, stderr| Macmap.map_iface_to_ip(stdout) } Try it! It's fun == Copyright Copyright (c) 2009 Ari Lerner. See LICENSE for details.
When using Sprockets 2.0 with Sass you will eventually run into a pretty big issue. `//= require` directives will not allow Sass mixins, variables, etc. to be shared between files. So you'll try to use `@import`, and that'll also blow up in your face. `sprockets-sass` fixes all of this by creating a Sass::Importer that is Sprockets aware.
using try that takes an array of chainable try calls
Just when you thought you could ruin someones day by requiring mathn. Try mathf and put the surprise back into math
A handy dandy autoload / require / load helper for your rubies. Similar to using[1], but with a few differences of opinion, and a bit shorter. Basically, expand path is fine, up until a point. Sometimes there's no point (i.e. when the load path already contains most of the path you're trying to open). When you're writing libs that users might require sub parts with 'libname/sub_part', then expand_path combined with say, rubygems, can lead to double requires. Lets not do that. :-) [1] http://github.com/smtlaissezfaire/using/
CodeRay is a Ruby library for syntax highlighting. I try to make CodeRay easy to use and intuitive, but at the same time fully featured, complete, fast and efficient. Usage is simple: require 'coderay' code = 'some %q(weird (Ruby) can't shock) me!' puts CodeRay.scan(code, :ruby).html
Abstracts over the interfaces to the various implementation-specific profiling tools
== ABOUT A simple program and library to conjugate french verbs. Parses responses to requests to an online reference site. === Executable ConjugateFR comes with the executable binary +conjugatefr+. To view information about it's supported arguments, run conjugatefr --help === Custom Renderers To make a custom renderer, just type require conjugatefr/renderer and then make a class that extends +Renderer+. An example is as follows: require 'conjugatefr/renderer' class ExampleRenderer < Renderer def pre puts "This goes before the words." end def word (name, words) print "#{name}:" words.each do |word| print " #{word}" end end def post puts "This goes after the words." end def description; "Renders an example format."; end end # Add to the Renderers list (For CLI and other programs that use it.) $renderers["Example"] = ExampleRenderer.new To try this out, save it as +erend.rb+ and then run: conjugatefr -R ./erend.rb -r Example It will produce the output: This goes before the words. someword: someconjugation etc etc ... (more words will be here) This goes after the words. === The Library The library can be included with +require conjugatefr+. It includes the +ConjugateFR+ class.
ROS Ruby Client: rosruby ======= [ROS](http://ros.org) is Robot Operating System developed by [Willow Garage](http://www.willowgarage.com/) and open source communities. This project supports ruby ROS client. You can program robots by ruby, very easily. **Homepage**: http://otl.github.com/rosruby **Git**: http://github.com/OTL/rosruby **Author**: Takashi Ogura **Copyright**: 2012 **License**: new BSD License **Latest Version**: 0.2.0 Requirements ---------- - ruby (1.8.x/1.9.x) - ROS (electric/fuerte) - ROS requires python2.7 or more libraries Let's start --------------- Install ROS and ruby first. ROS document is [http://ros.org/wiki/ROS/Installation](http://ros.org/wiki/ROS/Installation) . You can install ruby by apt. ```bash $ sudo apt-get install ruby ``` Download rosruby into your ROS_PACKAGE_PATH. ````bash $ git clone git://github.com/OTL/rosruby.git ``` please add RUBYLIB environment variable, like below (if you are using bash). ```bash $ echo "export RUBYLIB=`rospack find rosruby`/lib" >> ~/.bashrc $ source ~/.bashrc ``` To use with precompiled electric release ----------------------- If you are using precompiled ROS distro, use the msg/srv generation script (rosruby_genmsg.py) If you are using ROS from source, it requires just recompile the msg/srv packages by rosmake rosruby. ```bash $ rosrun rosruby rosruby_genmsg.py ``` This converts msg/srv to .rb which is needed by sample programs. If you want to make other packages, add package names for args. For example, ```bash $ rosrun rosruby rosruby_genmsg.py geometry_msgs nav_msgs ``` Sample Source -------------- ## Subscriber ```ruby #!/usr/bin/env ruby require 'ros' require 'std_msgs/String' node = ROS::Node.new('/rosruby/sample_subscriber') node.subscribe('/chatter', Std_msgs::String) do |msg| puts "message come! = \'#{msg.data}\'" end while node.ok? node.spin_once sleep(1) end ``` ## Publisher ```ruby #!/usr/bin/env ruby require 'ros' require 'std_msgs/String' node = ROS::Node.new('/rosruby/sample_publisher') publisher = node.advertise('/chatter', Std_msgs::String) msg = Std_msgs::String.new i = 0 while node.ok? msg.data = "Hello, rosruby!: #{i}" publisher.publish(msg) sleep(1.0) i += 1 end ``` Note ---------------- Ruby requires 'Start with Capital letter' for class or module names. So please use **S**td_msgs::String class instead of **s**td_msgs::String. Try Publish and Subscribe ---------------------- You needs three terminal as it is often for ROS users. Then you run roscore if is not running. ```bash $ roscore ``` run publisher sample ```bash $ rosrun rosruby sample_publisher.rb ``` run subscription sample ```bash $ rosrun rosruby sample_subscriber.rb ``` you can check publication by using rostopic. ```bash $ rostopic list $ rostopic echo /chatter ``` Try Service? ---------------------- ```bash $ rosrun rosruby add_two_ints_server.rb ``` run client with args ('a' and 'b' for roscpp_tutorials/TwoInts) ```bash $ rosrun rosruby add_two_ints_client.rb 10 20 ``` and more... ---------------------- You need more tools for testing, generating documentations. ```bash $ sudo apt-get install rake gem $ sudo gem install yard redcarpet simplecov ``` do all tests ------------------------- run roscore if is not running. ```bash $ roscore ``` and run the unit tests. ```bash $ roscd rosruby $ rake test ``` documents -------------------------- you can generate API documents using yard. Document generation needs yard and redcarpet. You can install these by gem command like this. ```bash $ gem install yard redcarpet ``` Then try to generate documentds. ```bash $ rake yard ``` You can access to the generated documents from [here](http://otl.github.com/rosruby/doc/).
Send SMS messages using the OpenMarket API
== Develop, Decorate and manage Dependencies for C (GNU) Makefiles easily with a Ruby script. Install using the Ruby Gem: > gem install demake To create an example with multiple sample applications: > demake example This will create a directory named example containing the example. To create an example with a single sample application: > demake oreo This will create a directory named oreo containing the example. It requires a demake directory and application file containing the application names followed by depencencies separated by spaces and with a new line to indicate a different application. Something like (from the example): > mkdir demake > echo "hello string" > demake/applications > echo "goodbye string" >> demake/applications > demake For customization, optionally include (see example): demake/settings.rb, demake/test-target.rb, demake/install-target.rb, demake/license The output of the command by itself is a (GNU style) file named Makefile: > demake You can also clone from git: > git clone https://github.com/MinaswanNakamoto/demake.git > chmod +x demake/bin/demake > cd demake > bin/demake example > cd example ; make ; make build ; make test If you have an existing C application and you want to generate a Makefile for it, you might try the gen_application shell script. > ./gen_application myapp
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.