Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
LaserCutter is a ruby library for generating PDF designs for boxes of custom dimensions that suit your project, that are meant to be used as a cut template on a laser-cutter. The sides of the box snap together using alternating notches, that are deliberately laid out in a symmetric form.
To use laser-cutter
you need to have a recent version of ruby interpreter, install it as a gem, and use command line to generate PDFs.
MakeABox.IO is an online web application that uses laser-cutter
library and provides a straight-forward user interface for generating PDF designs without the need to install the gem or use command line.
Use whatever suites you better.
NOTE: Please read our feature comparison guide of LaserCutter against an older tool called BoxMaker.
The gem depends primarily on Prawn – a fantastic PDF generation library.
Add this line to your application's Gemfile:
gem 'laser-cutter'
And then execute:
$ bundle
Or install it manually:
$ gem install laser-cutter
We'll start with some examples:
Create a box defined in inches, with kerf (cut width) set to 0.005in
, and open PDF in preview right after:
laser-cutter -z 3x2x2/0.125 -k 0.005 -O -o box.pdf
Create a box defined in millimeters, print verbose info, and set page size to A3, and layout to landscape, and stroke width to 1/2mm
:
laser-cutter -u mm -w70 -h20 -d50 -t4.3 -n5 -iA3 -l landscape -s0.5 -v -O -o box.pdf
List all possible page sizes in metric system:
laser-cutter -L -u mm
Create a box with provided dimensions, and save the config to a file for later use:
laser-cutter -z 1.1x2.5x1.5/0.125/0.125 -p 0.1 -O -o box.pdf -W box-settings.json
Read settings from a previously saved file:
laser-cutter -O -o box.pdf -R box-settings.json
cat box-settings.json | laser-cutter -O -o box.pdf -R -
Usage: laser-cutter [options] -o filename.pdf
eg: laser-cutter -z 1x1.5x2/0.125 -O -o box.pdf
Specific Options:
-w, --width WIDTH Internal width of the box
-h, --height HEIGHT Internal height of the box
-d, --depth DEPTH Internal depth of the box
-t, --thickness THICKNESS Thickness of the box material
-n, --notch NOTCH Optional notch length (aka "tab width"), guide only
-k, --kerf KERF Kerf - cut width (default is 0.0024in)
-m, --margin MARGIN Margins from the edge of the document
-p, --padding PADDING Space between the boxes on the page
-s, --stroke WIDTH Numeric stroke width of the line
-i, --page_size LETTER Document page size, default is autofit the box.
-l, --page_layout portrait Page layout, other option is 'landscape'
-O, --open Open generated file with system viewer before exiting
-W, --write CONFIG_FILE Save provided configuration to a file, use '-' for STDOUT
-R, --read CONFIG_FILE Read configuration from a file, or use '-' for STDIN
-L, --list-all-page-sizes Print all available page sizes with dimensions and exit
-M, --no-metadata Do not print box metadata on the PDF
-v, --[no-]verbose Run verbosely
-B, --inside-box Draw the inside boxes (helpful to verify kerfing)
-D, --debug Show full exception stack trace on error
--examples Show detailed usage examples
--help Show this message
--version Show version
Common Options:
-o, --file FILE Required output filename of the PDF
-z, --size WxHxD/T[/N] Combined internal dimensions: W = width, H = height,
D = depth, T = thickness, and optional N = notch length
-u, --units UNITS Either 'in' for inches (default) or 'mm'
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that laser-cutter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.