CLOC is a single-file Perl program that counts lines of code very quickly in large projects.
If even more speed is needed, CLOC can run with parallel processes.
Recent versions of CLOC are 10-100x faster than old versions.
The Linux distro might have an old / slow CLOC version.
It can be worth downloading the current version of CLOC if you use it a lot.
CLOC works on any operating system since it’s just Perl script.
For Linux / macOS:
download
latest cloc-*.pl to ~/.local/bin.
Be sure $HOME/.local/bin is on your PATH by adding to ~/.profile:
exportPATH=$HOME/.local/bin:$PATH
For convenience, make a softlink for cloc:
ln -s ~/.local/bin/cloc-*.pl ~/.local/bin/cloc
Make sure it’s executable:
chmod +x ~/.local/bin/cloc
For Windowsdownload
latest cloc-*.exe to c:\cloc\ and add c:\cloc to the user PATH.
To make CLOC run N times faster, you need the Perl Parallel::ForkManager library, which on Linux is installed by:
Word wrapping in nano text editor can make scripts and files fail to run/parse properly.
A simple edit can goof up a config or script by adding unwanted newlines.
These settings are in general good for nano on any operating system.
Disable text wrap in nano by adding to ~/.nanorc
set nowrap
A suggested ~/.nanorc contains the following for good defaults including Python coding:
set constantshow
set tabsize 4set nowrap
set tabstospaces
constantshow: show line and column of cursor position (on old nano version as in Red Hat 7, this option may not be recognized)
tabsize 4, tabstospaces: make tabs into 4 spaces
nowrap: disable long-line text wrapping
Nano syntax highlighting is enabled with
include statements
in ~/.nanorc.
WINE creates serial port
softlinks(
automatically.
Serial port mapping is managed via
WINEPREFIX=~/.wine wine regedit
Be sure to include the WINEPREFIX (default is ~/.wine)
Which WINE serial port to use: find the WINE serial port corresponding to the Linux serial port device name by watch log output from:
dmesg -w
when plugging in the serial ↔ USB adapter.
Using WINEPREFIX, start the WINE registry editor:
WINEPREFIX=~/.wine wine regedit
Configure the port–if the device is seen at /dev/ttyUSB0, and you want it to appear to WINE on COM1, edit HKEY_LOCAL_MACHINE\Software\Wine\Ports to have a new string entry named COM1 with value/dev/ttyUSB0.
Verify this setting (but do not edit) by:
ls ~/.wine/dosdevices
where again ~/.wine is the location of your WINEPREFIX.
Currently ReactOS only covers through Windows XP/2003.
FFmpeg has required Windows 7 or newer since 2015.
Thus without some hacks or compiling FFmpeg on ReactOS yourself, FFmpeg isn’t currently available on ReactOS.
A current version of VLC is in the ReactOS Application Explorer, try doing what you need with VLC instead of FFmpeg with ReactOS until ReactOS can support Windows 7 applications better.
These programs use syntax similar to the $1000 Matlab Mapping and Aerospace Toolboxes, while being independently developed as open-source software.
We use continuous integration on each package to help ensure quality results.
Instead of low-quality screen-shots a PDF to get the images, use Poppler to extract the original high-resolution images from the PDF.
Note: only raster images can be exported with Poppler.
Examples of PDF image extraction tasks:
List all PDF images:
pdfimages -list in.pdf
Extract PDF images from all pages, dumping all images in mydoc.pdf to the same directory.
Filenames start with out-.
There might be a lot of images.
pdfimages -all in.pdf out
Extract PDF images from specific pages: example is for page 3 only:
We have created Python scripts in
LibreOffice Utils
that recursively search for files matching a glob pattern (such as *.docx) and convert or print these input documents.
They use LibreOffice in headless (console) mode, just a single Terminal command.
doc2pdf.py: recursively converts directories containing DOC, DOCX, RTF or other word processing files to PDF.
doc2print.py: recursively print documents to the default printer