Package for getting Buffers from Streams and Files with maximum size input.
Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
Get the ArrayBuffer out of a TypedArray, robustly.
Modern Buffer API polyfill without footguns
Node.js Buffer API, for the browser
minimal implementation of a PassThrough stream
Get the ArrayBuffer out of a DataView, robustly.
Pass in a string, array, Buffer, Data View, or Uint8Array, and get a Buffer back.
abstract base class for crypto-streams
Safer Node.js Buffer API
smart-buffer is a Buffer wrapper that adds automatic read & write offset tracking, string operations, data insertions, and more.
Is this value a JS SharedArrayBuffer?
Is this value a JS ArrayBuffer?
Reads / writes floats / doubles from / to buffers in both modern and ancient browsers.
A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.
Add support for more integer widths to Buffer
JSON parse & stringify that supports binary via bops & base64
A pure javascript CRC32 algorithm that plays nice with binary data
Parse artboards inside any sketch file and get buffer data
Determine if an object is a Buffer
Convert a typed array to a Buffer without a copy
Cyclist is an efficient cyclic list implemention.
get buffer address
Read/write IEEE754 floating point numbers from/to a Buffer or array-like object
get share count in Buffer/Facebook/Feedly/GooglePlus/HatenaBookmark/Linkedin/Pinterest/Pocket/Twitter
g1nn13 fork changes: * added buffer() method to get image buffer for writing (to Amazon S3) * added fit_within() method to resize an image to fit within a specified height and width without changing the image's aspect ratio * added resize_with_crop() to resize and crop images where the target aspect ratio differs from the original aspect ratio. This is for converting portrait to landscape and landscape to portrait. ImageScience is a clean and happy Ruby library that generates thumbnails -- and kicks the living crap out of RMagick. Oh, and it doesn't leak memory like a sieve. :) For more information including build steps, see http://seattlerb.rubyforge.org/
Wraps popen3 in a nice interface that allows to just run a command and get live stdout and stderr on line by line basis using a callback. Additionally a live chat with a command can be implemented with a buffered non-blocking writer that's working out of the box.
# Rack HTTP Pipe Use to pipe directly a remote HTTP file without buffering it. > /!\ Do not work with WebBrick, tested with puma ## Use case * Given a file named #HASH#.pdf on S3 * You want a clean URL and handling the authentication in front of it ``` GET http:/example.com/download Content-Disposition: attachment;filename=name-fetched-from-db.pdf Content-Length Content-Type etc. ``` ## Usage ```ruby get "/" do http_pipe "http://example.com/iso-ubuntu-1404-64bits", { status: 200, headers: { "Content-Type: application/octet-stream", "Content-Disposition: attachment;filename=ubuntu.iso", } } end ``` See the example directory for an example app using sinatra
Labrat is a linux command-line program for quickly printing labels. Labrat uses the wonderful Prawn gem to generate PDF files with label formatting in mind. With labrat properly configured, printing a label is as simple as: $ labrat 'Income Taxes 2021 ~~ Example Maker, Inc.' And you will get a two-line file-folder label with the text centered. It can print on dymo label printer rolls or Avery sheet labels. It knows the layout of most Avery label types. For Emacs users, labrat includes elisp code for invoking labrat from within a buffer, providing a quick way to print labels.
Ruby's contemporary test coverage tools all lie, exaggerating coverage through false-positives and creating a false sense of security; minitest-coverage tries to address this. Coverage Analysis Tools rely on tracing facilities built into ruby’s VM. You run your tests, and collect data. Seems simple, but that’s a very flawed approach that buffers your coverage numbers up falsely. I’ve witnessed false coverage by as much as 60%, but it could be even worse. Worse, the tracing facilities currently make it impossible to get truly accurate numbers. Even so, they can be improved to be much more accurate.
Lookout-Rake Lookout-Rake provides Rake¹ tasks for testing using Lookout. ¹ See http://rake.rubyforge.org/ § Installation Install Lookout-Rake with % gem install lookout-rake § Usage Include the following code in your ‹Rakefile›: require 'lookout-rake-3.0' Lookout::Rake::Tasks::Test.new If the ‹:default› task hasn’t been defined it’ll be set to depend on the ‹:test› task. The ‹:check› task will also depend on the ‹:test› task. There’s also a ‹:test:coverage› task that gets defined that uses the coverage library that comes with Ruby 1.9 to check the test coverage when the tests are run. You can hook up your test task to use your Inventory¹: load File.expand_path('../lib/library-X.0/version.rb', __FILE__) Lookout::Rake::Tasks::Test.new :inventory => Library::Version Also, if you use the tasks that come with Inventory-Rake², the test task will hook into the inventory you tell them to use automatically, that is, the following will do: load File.expand_path('../lib/library-X.0/version.rb', __FILE__) Inventory::Rake::Tasks.define Library::Version Lookout::Rake::Tasks::Test.new For further usage information, see the {API documentation}³. ¹ Inventory: http://disu.se/software/inventory/ ² Inventory-Rake: http://disu.se/software/inventory-rake/ ³ API: http://disu.se/software/lookout-rake/api/Lookout/Rake/Tasks/Test/ § Integration To use Lookout together with Vim¹, place ‹contrib/rakelookout.vim› in ‹~/.vim/compiler› and add compiler rakelookout to ‹~/.vim/after/ftplugin/ruby.vim›. Executing ‹:make› from inside Vim will now run your tests and an errors and failures can be visited with ‹:cnext›. Execute ‹:help quickfix› for additional information. Another useful addition to your ‹~/.vim/after/ftplugin/ruby.vim› file may be nnoremap <buffer> <silent> <Leader>M <Esc>:call <SID>run_test()<CR> let b:undo_ftplugin .= ' | nunmap <buffer> <Leader>M' function! s:run_test() let test = expand('%') let line = 'LINE=' . line('.') if test =~ '^lib/' let test = substitute(test, '^lib/', 'test/', '') let line = "" endif execute 'make' 'TEST=' . shellescape(test) line endfunction Now, pressing ‹<Leader>M› will either run all tests for a given class, if the implementation file is active, or run the test at or just before the cursor, if the test file is active. This is useful if you’re currently receiving a lot of errors and/or failures and want to focus on those associated with a specific class or on a specific test. ¹ Find out more about Vim at http://www.vim.org/ § Financing Currently, most of my time is spent at my day job and in my rather busy private life. Please motivate me to spend time on this piece of software by donating some of your money to this project. Yeah, I realize that requesting money to develop software is a bit, well, capitalistic of me. But please realize that I live in a capitalistic society and I need money to have other people give me the things that I need to continue living under the rules of said society. So, if you feel that this piece of software has helped you out enough to warrant a reward, please PayPal a donation to now@disu.se¹. Thanks! Your support won’t go unnoticed! ¹ Send a donation: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=now%40disu%2ese&item_name=Nikolai%20Weibull%20Software%20Services § Reporting Bugs Please report any bugs that you encounter to the {issue tracker}¹. ¹ See https://github.com/now/lookout-rake/issues § Authors Nikolai Weibull wrote the code, the tests, the manual pages, and this README.
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.