### Initial Uruk Setup Source: https://manpages.ubuntu.com/manpages/resolute/man8/uruk.8.html Copy the example configuration file, edit it, and start the Uruk service. ```bash # cp /usr/share/doc/uruk/examples/rc \ /etc/uruk/rc # vi /etc/uruk/rc # urukctl start ``` -------------------------------- ### yotta install examples Source: https://manpages.ubuntu.com/manpages/resolute/man1/yotta.1.html Example commands for installing modules from the registry and from GitHub. ```bash yotta install simpleog yotta install ARM-RD/simplelog ``` -------------------------------- ### Compile, install, and clean example Source: https://manpages.ubuntu.com/manpages/resolute/man8/prxs.8.html Example command to compile, install, and clean a custom module. ```bash pxrs -c -i -d mod_custom.c ``` -------------------------------- ### Install CODE Example Source: https://manpages.ubuntu.com/manpages/resolute/man7/cmake-commands.7.html Example of using the CODE argument to print a message during installation. ```cmake install(CODE "message(\"Sample install message.\")") ``` -------------------------------- ### Installation example with comments Source: https://manpages.ubuntu.com/manpages/resolute/man3/Module::Build.3pm.html Illustrates initial configuration and running three actions: build (default), test, and install. Comments explain the role of each command, including why './' is needed. ```bash perl Build.PL # 'Build.PL' script creates the 'Build' script ./Build # Need ./ to ensure we're using this "Build" script ./Build test # and not another one that happens to be in the PATH ./Build install ``` -------------------------------- ### Example setup() implementation Source: https://manpages.ubuntu.com/manpages/resolute/man3/Titanium.3pm.html A concrete example of a setup() method that sets the start mode and run modes. ```perl sub setup { my $c = shift; $c->start_mode('putform'); $c->run_modes([qw/ form form_process /]); } ``` -------------------------------- ### getpos command with start Source: https://manpages.ubuntu.com/manpages/resolute/man1/nama.1p.html Get the current playhead position (in seconds). The example shows starting the engine and then getting the position. ```text getpos ``` ```text start # Start the engine. ``` ```text gp # Get the current position of the playhead. Where am I? ``` -------------------------------- ### Example installation file Source: https://manpages.ubuntu.com/manpages/resolute/man1/bg-installer.1.html This example reads conf-bin and installs prog1 and setuid root prog2 (if built) under it. Then reads conf-include, creates directory package, installs pkgbase.h as base.h, and creates symlink package.h to package/base.h. ```text >bin c:::755::prog2 c?:root:root:4750::prog2 >include d:::755:package c:::644:package:base.h:pkgbase.h s:::::package.h:package/base.h ``` -------------------------------- ### Start instances using various selection methods Source: https://manpages.ubuntu.com/manpages/resolute/man8/gnt-instance.8.html Examples showing how to start a specific instance, instances on a specific node, or all instances in the cluster. ```bash # gnt-instance start instance1.example.com # gnt-instance start --node node1.example.com node2.example.com # gnt-instance start --all ``` -------------------------------- ### Removing offset suffix to get start offset Source: https://manpages.ubuntu.com/manpages/resolute/man3/Convert::Binary::C.3pm.html Shows how to remove the offset suffix to get the offset where the member starts. The example prints the start offset. ```perl $member =~ s/\+\d+$//; $offset = $c->offsetof('foo', $member); print "'$member' starts at offset $offset of struct foo"; ``` -------------------------------- ### Example Installing message Source: https://manpages.ubuntu.com/manpages/resolute/man7/cmake-variables.7.html Example of the message printed when a file is newly installed or updated. ```text -- Installing: /some/destination/path ``` -------------------------------- ### Quick install and environment setup Source: https://manpages.ubuntu.com/manpages/resolute/man3/Pinto::Manual::Installing.3pm.html For the impatient: download and run the installer script, then source the generated bashrc to set up the environment. ```bash curl -L http://getpinto.stratopan.com | bash source ~/opt/local/pinto/etc/bashrc ``` ```bash echo source ~/opt/local/pinto/etc/bashrc >> ~/.bashrc ``` -------------------------------- ### Get all messages in a thread starting from a node Source: https://manpages.ubuntu.com/manpages/resolute/man3/Mail::Box::Thread::Node.3pm.html Shows how to use threadMessages to retrieve all messages in a thread starting from the current thread node. The example gets a message, finds its thread start, and then calls threadMessages. ```perl my @t = $folder->message(3)->threadStart->threadMessages; ``` -------------------------------- ### tokenize_start: Get start byte offset Source: https://manpages.ubuntu.com/manpages/resolute/man3/JSON::Tokenize.3pm.html Example call for the tokenize_start function, which returns the start of the token as a byte offset from the start of the string. ```perl my $start = tokenize_start ($token); ``` -------------------------------- ### Setup path, classpath, and current directory for tracing example Source: https://manpages.ubuntu.com/manpages/resolute/man1/ajc.1.html Commands to set up the environment for the tracing example. Adjust paths and separators as needed. ```bash cd examples export ajrt=../lib/aspectjrt.jar export CLASSPATH="$ajrt" export PATH="../bin:$PATH" ``` -------------------------------- ### Queue commands example Source: https://manpages.ubuntu.com/manpages/resolute/man1/lftp.1.html Shows how to queue commands in lftp: start a background get, wait for it, queue another get, change directory, and queue another get. ```lftp > get file & [1] get file > queue wait 1 > queue get another_file > cd a_directory > queue get yet_another_file ``` -------------------------------- ### Examples of install command with module, distribution, and regexp Source: https://manpages.ubuntu.com/manpages/resolute/man3/CPAN.3perl.html Demonstrates installing a module by name, a distribution file, and using a regexp to match a distribution. The regexp must be unambiguous to install a single object. ```text install Dummy::Perl # installs the module install AUXXX/Dummy-Perl-3.14.tar.gz # installs that distribution install /Dummy-Perl-3.14/ # same if the regexp is unambiguous ``` -------------------------------- ### Set up Vcpkg and use it with Alien Source: https://manpages.ubuntu.com/manpages/resolute/man3/Alien::Build::Plugin::Probe::Vcpkg.3pm.html Quick start guide: clone and install Vcpkg, integrate it, update PATH for 64-bit Perl, install libffi, and install an alien module. ```cmd # install Vcpkg C:\> git clone https://github.com/Microsoft/vcpkg.git C:\> cd vcpkg C:\vcpkg> .\bootstrap-vcpkg.bat C:\vcpkg> .\vcpkg integrate install # update PATH to include the bin directory # so that .DLL files can be found by Perl C:\vcpkg> path c:\vcpkg\installed\x64-windows\bin;%PATH% # install the packages that you want C:\vcpkg> .\vcpkg install libffi # install the alien that uses it C:\vcpkg> cpanm Alien::FFI ``` -------------------------------- ### Start the Tutorial Source: https://manpages.ubuntu.com/manpages/resolute/man1/dx.1.html Starts the Tutorial. ```shell dx -tutorial ``` -------------------------------- ### FvwmIconMan SortWeight example Source: https://manpages.ubuntu.com/manpages/resolute/man1/Fvwm2IconMan.1.html Example configuration for weighted sorting. Assigns weights to windows matching patterns; lower weights appear first. In this example, xterms with titles starting with 'special' get weight 1, other xterms get weight 10, and all other windows get weight 5. If no default weight is given, the default is 0. ```fvwm *FvwmIconMan: Sort weighted *FvwmIconMan: SortWeight 1 class=XTerm title=special* *FvwmIconMan: SortWeight 10 class=XTerm *FvwmIconMan: SortWeight 5 ``` -------------------------------- ### arm-start command syntax Source: https://manpages.ubuntu.com/manpages/resolute/man1/nama.1p.html Generate and connect the setup and then start, allowing direct recording or listening. ```text arm-start ``` -------------------------------- ### Initialize the server example Source: https://manpages.ubuntu.com/manpages/resolute/man8/amssl.8.html Example command to initialize the server with specific organizational details. ```bash amssl --init --country US --state California --locality Sunnyvale --organisation zmanda --organistion-unit engineering --common boss --email 'email@email.com' ``` -------------------------------- ### SYNOPSIS: Full test workflow with Test::Log::Log4perl Source: https://manpages.ubuntu.com/manpages/resolute/man3/Test::Log::Log4perl.3pm.html Complete example showing setup, getting loggers, starting the test, declaring expected log messages, logging actual messages, ending the test, and using the expect() method. This is the main usage pattern for the module. ```perl # setup l4p use Log::Log4Perl; # do your normal Log::Log4Perl setup here use Test::Log::Log4perl; # get the loggers my $logger = Log::Log4perl->get_logger("Foo::Bar"); my $tlogger = Test::Log::Log4perl->get_logger("Foo::Bar"); # test l4p Test::Log::Log4perl->start(); # declare we're going to log something $tlogger->error("This is a test"); # log that something $logger->error("This is a test"); # test that those things matched Test::Log::Log4perl->end("Test that that logs okay"); # we also have a simplified version: { my $foo = Test::Log::Log4perl->expect(['foo.bar.quux', warn => qr/hello/ ]); # ... do something that should log 'hello' } # $foo goes out of scope; this triggers the test. ``` -------------------------------- ### Get bucket start offset with APR::Bucket->start Source: https://manpages.ubuntu.com/manpages/resolute/man3/APR::Bucket.3pm.html Returns the offset used when the bucket was created. For example, if the offset was 3, $start will be 3. This method is unsupported and subject to change. ```perl $start = $b->start; ``` -------------------------------- ### Setup and run example for mini-buildd-super-portext Source: https://manpages.ubuntu.com/manpages/resolute/man1/mini-buildd-super-portext.1.html Steps to set up the apt cache and run mini-buildd-super-portext to portext a source package. The example uses a DSC URL and the buster-test-unstable distribution. ```text 1. Run this in on system you want to PORT TO (f.e..: buster, 'deb' apt lines for buster). 2. Add 'deb-src' apt lines for the system you want to PORT FROM (f.e.: bullseye, 'deb-src' apt lines for bullseye). 3. sudo apt-get update 4. mini-buildd-super-portext **-v** http://admin@localhost:8066 http://localhost:3142/debian//pool/main/k/kguiaddons/kguiaddons_5.70.0-2.dsc buster-test-unstable ``` -------------------------------- ### Run osmo-trx-uhd with default configuration Source: https://manpages.ubuntu.com/manpages/resolute/man1/osmo-trx-uhd.1.html Starts osmo-trx-uhd with a default configuration file provided by the package. Use this to quickly get started with a default setup. ```bash osmo-trx-uhd -C /usr/share/doc/osmo-trx/examples/osmo-trx.cfg ``` -------------------------------- ### Complex custom install instructions example Source: https://manpages.ubuntu.com/manpages/resolute/man7/cpack-generators.7.html Example of setting multiple custom install instructions for components. ```cmake set(CPACK_INNOSETUP_CUSTOM_INSTALL_INSTRUCTIONS "component1/my_folder" "Name: \"{userdocs}\\my_folder\"\; Components: component1" "component2/my_folder2/my_file.txt" "Source: \"component2\\my_folder2\\my_file.txt\"\; DestDir: \"{app}\\my_folder2\\my_file.txt\"\; Flags: ignoreversion uninsneveruninstall\; Components: component2") ``` -------------------------------- ### Run setup for Module::Starter::PBP Source: https://manpages.ubuntu.com/manpages/resolute/man3/Module::Starter::PBP.3pm.html Command to run the setup script for Module::Starter::PBP, which prompts for your name, email address, and template directory path, then creates and installs the necessary template files. ```shell > perl -MModule::Starter::PBP=setup ``` -------------------------------- ### Example: helloworld.pl - simple Perl program to be converted Source: https://manpages.ubuntu.com/manpages/resolute/man3/Acme::EyeDrops.3pm.html A minimal Perl program that prints 'hello world'. This is the source file used in the 'Getting Started' example. ```perl print "hello world\n"; ``` -------------------------------- ### start method usage and examples Source: https://manpages.ubuntu.com/manpages/resolute/man3/Bio::Search::Hit::PsiBlastHit.3pm.html Get the start coordinate for the query, hit, or both sequences. Returns the lowest start value across all HSPs. Requires HSP tiling, which is done automatically if needed. Coordinates are normalized so start < end. ```perl Usage : $sbjct->start( [seq_type] ); Purpose : Gets the start coordinate for the query, sbjct, or both sequences : in the PsiBlastHit object. If there is more than one HSP, the lowest start : value of all HSPs is returned. Example : $qbeg = $sbjct->start('query'); : $sbeg = $sbjct->start('hit'); : ($qbeg, $sbeg) = $sbjct->start(); Returns : scalar context: integer : array context without args: list of two integers (queryStart, sbjctStart) : Array context can be "induced" by providing an argument of 'list' or 'array'. Argument : In scalar context: seq_type = 'query' or 'hit' or 'sbjct' (default = 'query') ('sbjct' is synonymous with 'hit') Throws : n/a Comments : This method requires that all HSPs be tiled. If there is more than one : HSP and they have not already been tiled, they will be tiled first automatically.. : Remember that the start and end coordinates of all HSPs are : normalized so that start < end. Strand information can be : obtained by calling $hit->strand(). ``` -------------------------------- ### Example /etc/bootparams configuration Source: https://manpages.ubuntu.com/manpages/resolute/man5/bootparams.5.html An example entry for a client named 'dummy' showing how to define root, swap, and dump paths using backslashes for line continuation. ```text dummy root=host:/export/dummy/root \ swap=host:/export/dummy/swap \ dump=host:/export/dummy/swap ``` -------------------------------- ### KeyboardLayouts preference example Source: https://manpages.ubuntu.com/manpages/resolute/man1/icewm-experimental.1.html Sets the keyboard layouts to German, French, and Japanese. The first layout is the default and is installed when icewm starts. Requires the setxkbmap program to be installed. ```plaintext KeyboardLayouts = "de", "fr", "jp" ``` -------------------------------- ### Copying the example configuration Source: https://manpages.ubuntu.com/manpages/resolute/man7/grokevt.7.html Create a new system configuration profile by copying the default example directory. ```bash # cd /usr/local/etc/grokevt/systems # cp -r example mysystem ``` -------------------------------- ### gem3.3 examples - install, list, build, help Source: https://manpages.ubuntu.com/manpages/resolute/man1/gem3.3.1.html Common gem3.3 commands: install a gem, list local gems, build a gemspec, and get help for a command. ```shell gem3.3 install rake ``` ```shell gem3.3 list --local ``` ```shell gem3.3 build package.gemspec ``` ```shell gem3.3 help install ``` -------------------------------- ### Configure Module::Starter::PBP in ~/.module-starter/config and run module-starter Source: https://manpages.ubuntu.com/manpages/resolute/man3/Module::Starter::PBP.3pm.html Shows the configuration file entries needed to use Module::Starter::PBP as a plugin, along with the command-line invocation to create a new module. Also includes an alternative setup command using perl -MModule::Starter::PBP=setup. ```perl # In your ~/.module-starter/config file... author: email: plugins: Module::Starter::PBP template_dir: # Then on the command-line... > module-starter --module=Your::New::Module # Or, if you're lazy and happy to go with # the recommendations in "Perl Best Practices"... > perl -MModule::Starter::PBP=setup ``` -------------------------------- ### Get visible descendants of the root item Source: https://manpages.ubuntu.com/manpages/resolute/man3/treectrl.3tk.html Example of retrieving the IDs of all visible descendants starting from the root item. ```tcl $T item id "root descendants visible" ``` -------------------------------- ### guide_strand method usage Source: https://manpages.ubuntu.com/manpages/resolute/man3/Bio::Location::Split.3pm.html Usage example for the guide_strand method, which gets or sets the guide strand for a split location. ```perl Title : guide_strand Usage : $str = $loc->guide_strand(); Function: Get/Set the guide strand. Of use only if the split type is a 'join' (this helps determine the order of sublocation retrieval) Returns : value of guide strand (1, -1, or undef) Args : new value (-1 or 1, optional) ``` -------------------------------- ### apptainer run-help example with definition file and --app option Source: https://manpages.ubuntu.com/manpages/resolute/man1/apptainer-run-help.1.html Shows the full workflow: creating a definition file with %help and %apphelp sections, building the container, and running apptainer run-help with and without the --app option to display the corresponding help text. ```bash $ cat my_container.def Bootstrap: docker From: busybox %help Some help for this container %apphelp foo Some help for application 'foo' in this container $ sudo apptainer build my_container.sif my_container.def Using container recipe deffile: my_container.def [...snip...] Cleaning up... $ apptainer run-help my_container.sif Some help for this container $ apptainer run-help --app foo my_container.sif Some help for application in this container ``` -------------------------------- ### arduino-cli lib install examples Source: https://manpages.ubuntu.com/manpages/resolute/man1/arduino-cli-lib-install.1.html Shows various ways to install libraries: by name for the latest version, by name with a specific version, via git URLs, via git URL with a specific version, and via zip paths. ```bash debian/build/bin/arduino-cli lib install AudioZero # for the latest version. debian/build/bin/arduino-cli lib install AudioZero@1.0.0 # for the specific version. debian/build/bin/arduino-cli lib install --git-url https://github.com/arduino-libraries/WiFi101.git https://github.com/arduino-libraries/ArduinoBLE.git debian/build/bin/arduino-cli lib install --git-url https://github.com/arduino-libraries/WiFi101.git#0.16.0 # for the specific version. debian/build/bin/arduino-cli lib install --zip-path /path/to/WiFi101.zip /path/to/ArduinoBLE.zip ``` -------------------------------- ### GET /api/storage.json Source: https://manpages.ubuntu.com/manpages/resolute/man1/zoneminder.1.html Returns storage data for the ZoneMinder installation. For multi-storage setups, multiple storage entries are returned. ```APIDOC ## [GET] /api/storage.json ### Description Returns storage data for the ZoneMinder installation. ### Method GET ### Endpoint /api/storage.json ### Parameters None ### Request Example ``` curl http://server/zm/api/storage.json ``` ### Response #### Success Response (200) Returns a JSON object with a "storage" array containing storage entries. Each entry includes fields such as Id, Path, Name, Type, Url, DiskSpace, Scheme, ServerId, and DoDelete. #### Response Example ``` { "storage": [ { "Storage": { "Id": "0", "Path": "\/var\/cache\/zoneminder\/events", "Name": "Default", "Type": "local", "Url": null, "DiskSpace": "364705447651", "Scheme": "Medium", "ServerId": null, "DoDelete": true } } ] } ``` ``` -------------------------------- ### subtrace($base,$start,$end) usage example Source: https://manpages.ubuntu.com/manpages/resolute/man3/Bio::Seq::TraceI.3pm.html Shows how to call the subtrace method to get a subset of trace values from $start to $end. The first value is 1 and the range is inclusive. $start cannot be larger than $end but can be equal. ```perl Title : subtrace($base,$start,$end) Usage : @subset_of_traces = @{$obj->subtrace("A",10,40)}; Function: returns the trace values from $start to $end, where the first value is 1 and the number is inclusive, ie 1-2 are the first two trace values of this base. Start cannot be larger than end but can be equal. Returns : A reference to an array. Args : $base: "A","T","G" or "C" $start: a start position $end : an end position ``` -------------------------------- ### Usage examples for __install_stage Source: https://manpages.ubuntu.com/manpages/resolute/man7/cdist-type__install_stage.7.html Examples showing how to use __install_stage with different URI schemes and optional parameters like target and insecure mode. ```bash __install_stage --uri tftp:///path/to/stage.tgz __install_stage --uri http://path/to/stage.tgz --target /mnt/foobar __install_stage --uri file:///path/to/stage.tgz --target /target __install_stage --uri https://path/to/stage.tgz --target /mnt/foobar --insecure ``` -------------------------------- ### Create and start container with default script Source: https://manpages.ubuntu.com/manpages/resolute/man1/container-get.1.html Creates a container named example.net using the default download script and starts it. Requires sudo privileges. ```bash sudo container get,start -n example.net ``` -------------------------------- ### Non-root user installation example Source: https://manpages.ubuntu.com/manpages/resolute/man8/dscreate.8.html Example commands for a non-root user to set up and run a Directory Server instance. It sets PATH, creates a ds-root, refreshes the command hash, and starts the interactive installer. Note to use a non-privileged port number (greater than 1000). ```bash PATH=$HOME/bin:$PATH # Should be in .profile dscreate ds-root $HOME/mydsroot $HOME/bin hash -d dscreate # bash command to insure new dscreate wrapper will be used dscreate interactive # Note: Make sure to use non priviledged port number (i.e > 1000) ``` -------------------------------- ### go install example.com/pkg@v1.2.3 and @latest Source: https://manpages.ubuntu.com/manpages/resolute/man1/go-get.1.html Builds and installs commands in module-aware mode, ignoring the go.mod file in the current directory when a version is specified. ```shell go install example.com/pkg@v1.2.3 go install example.com/pkg@latest ``` -------------------------------- ### commands-from-file example: delete, install, password Source: https://manpages.ubuntu.com/manpages/resolute/man1/virt-sysprep.1.html Example lines for the --commands-from-file option. Each line contains a single customization command and its arguments. Empty lines and lines starting with '#' are ignored. ```plaintext delete /some/file install some-package password some-user:password:its-new-password ``` -------------------------------- ### last_command_output - Get output of last run command Source: https://manpages.ubuntu.com/manpages/resolute/man3/Rex::Commands.3pm.html Returns the output of the last 'run' command. In the example, it prints the output of the 'install' command (apt-get install foobar) on a Debian system. ```perl task "mytask", "myserver", sub { install "foobar"; say last_command_output(); }; ``` -------------------------------- ### install SYNOPSIS: command-line options Source: https://manpages.ubuntu.com/manpages/resolute/man1/install.1.html Shows the full command-line synopsis for the install utility, listing all supported options including --backup, --compare, --directory, --group, --mode, --owner, --preserve-timestamps, --strip, --suffix, --target-directory, --no-target-directory, --verbose, --preserve-context, --context, --unprivileged, --help, and --version. Use this as a reference for valid flags and their short forms. ```bash **install** [**--backup**] [**-b**] [**-c**] [**-C** |**--compare**] [**-d** |**--directory**] [**-D**] [**-g** |**--group**] [**-m** |**--mode**] [**-o** |**--owner**] [**-p** |**--preserve-timestamps**] [**-s** |**--strip**] [**--strip-program**] [**-S** |**--suffix**] [**-t** |**--target-directory**] [**-T** |**--no-target-directory**] [**-v** |**--verbose**] [**-P** |**--preserve-context**] [**-Z**] [**--context**] [**-U** |**--unprivileged**] [**-h** |**--help**] [**-V** |**--version**] [_SOURCE_... _DEST_|_DIRECTORY_...] ``` -------------------------------- ### numrandom examples: odd number from 1 to 10 Source: https://manpages.ubuntu.com/manpages/resolute/man1/numrandom.1.html Demonstrates using a step increment (i2) starting at 1 to get an odd number from 1 to 10. The example output is 9. ```bash $ numrandom /1..10i2/ 9 ``` -------------------------------- ### Setup initial bind mounts Source: https://manpages.ubuntu.com/manpages/resolute/man7/mount_namespaces.7.html Create the initial directory structure and bind mounts for the demonstration. ```bash #** mkdir -p /mnt/proc** #** mount --bind / /mnt** #** mount --bind /proc /mnt/proc** ``` -------------------------------- ### grub-install device.map example Source: https://manpages.ubuntu.com/manpages/resolute/man1/guestfish.1.html Example content for /boot/grub/device.map to resolve grub device mapping errors. Replace /dev/vda with the installation device. ```bash (hd0) /dev/vda ``` -------------------------------- ### Add help command with add_help_command Source: https://manpages.ubuntu.com/manpages/resolute/man1/argparse.1.html Adds a help command to the parser and defines an 'install' command. The example shows the parser setup and the help output for the general help and for the 'install' command. ```lua local parser = argparse() :add_help_command() parser:command "install" :description "Install a rock." ``` ```shell $ lua script.lua help ``` ```text Usage: script.lua [-h] ... Options: -h, --help Show this help message and exit. Commands: help Show help for commands. install Install a rock. ``` ```shell $ lua script.lua help install ``` ```text Usage: script.lua install [-h] Install a rock. Options: -h, --help Show this help message and exit. ``` -------------------------------- ### pause_span() example Source: https://manpages.ubuntu.com/manpages/resolute/man3/Marpa::R2::Scanless::R.3pm.html Calls pause_span() to get the pause span as a 2-element array (start and length). Returns undef if undefined. ```perl my ( $start, $length ) = $re->pause_span(); ``` -------------------------------- ### setUp() Source: https://manpages.ubuntu.com/manpages/resolute/man3/petsc4py.3.html Returns the data structure. ```APIDOC ## setUp() ### Description Returns the data structure. ### Return Type None ``` -------------------------------- ### Start tasksh and run example session Source: https://manpages.ubuntu.com/manpages/resolute/man1/tasksh.1.html Example session showing how to start tasksh and run commands like 'projects', 'tags', 'list', and 'quit'. The output for each command is displayed. Use this to see typical tasksh behavior. ```text $ tasksh task> projects Project Tasks Pri:None Pri:L Pri:M Pri:H ------- ----- -------- ----- ----- ----- 7 7 0 0 0 home 2 2 0 0 0 party 6 3 0 0 3 3 projects (15 tasks) task> tags Tag Count mall 2 1 tag (15 tasks) task> list ID Project Pri Due Active Age Description --------------------------------------------------------------------- 2 party H 10/17/2015 2 hrs Select and book a venue 5 party H 10/22/2015 2 hrs Design invitations 9 home 10/31/2015 1 hr Pay rent 3 party 2 hrs Mail invitations 4 party 2 hrs Select a caterer 6 party 2 hrs Print invitations 8 tasks task> quit $ ``` -------------------------------- ### Install completions for every new session on macOS Source: https://manpages.ubuntu.com/manpages/resolute/man1/adwatchd_completion_bash.1.html Execute this command once to install the bash completions for every new session on macOS. You will need to start a new shell for the setup to take effect. ```bash adwatchd completion bash > $(brew --prefix)/etc/bash_completion.d/adwatchd ``` -------------------------------- ### Install completions for every new session on Linux Source: https://manpages.ubuntu.com/manpages/resolute/man1/adwatchd_completion_bash.1.html Execute this command once to install the bash completions for every new session on Linux. You will need to start a new shell for the setup to take effect. ```bash adwatchd completion bash > /etc/bash_completion.d/adwatchd ``` -------------------------------- ### Install grub2 bootloader examples Source: https://manpages.ubuntu.com/manpages/resolute/man7/cdist-type__install_bootloader_grub.7.html Examples showing how to install the grub2 bootloader on a device, with and without specifying a custom chroot directory. ```bash __install_bootloader_grub /dev/sda __install_bootloader_grub /dev/sda --chroot /mnt/foobar ``` -------------------------------- ### List of example files in distribution Source: https://manpages.ubuntu.com/manpages/resolute/man3/Spreadsheet::WriteExcel.3pm.html A text listing of example files provided with Spreadsheet::WriteExcel, organized by 'Getting started' and 'Advanced' categories. Each entry includes a brief description of the feature it demonstrates. ```text Getting started =============== a_simple.pl A get started example with some basic features. demo.pl A demo of some of the available features. regions.pl A simple example of multiple worksheets. stats.pl Basic formulas and functions. formats.pl All the available formatting on several worksheets. bug_report.pl A template for submitting bug reports. Advanced ======== autofilter.pl Examples of worksheet autofilters. autofit.pl Simulate Excel's autofit for column widths. bigfile.pl Write past the 7MB limit with OLE::Storage_Lite. cgi.pl A simple CGI program. chart_area.pl A demo of area style charts. chart_bar.pl A demo of bar (vertical histogram) style charts. chart_column.pl A demo of column (histogram) style charts. chart_line.pl A demo of line style charts. chart_pie.pl A demo of pie style charts. chart_scatter.pl A demo of scatter style charts. chart_stock.pl A demo of stock style charts. chess.pl An example of reusing formatting via properties. colors.pl A demo of the colour palette and named colours. comments1.pl Add comments to worksheet cells. comments2.pl Add comments with advanced options. copyformat.pl Example of copying a cell format. data_validate.pl An example of data validation and dropdown lists. date_time.pl Write dates and times with write_date_time(). defined_name.pl Example of how to create defined names. ``` -------------------------------- ### Server configuration with startup module Source: https://manpages.ubuntu.com/manpages/resolute/man5/yaws.conf.5.html Example specifying a user-defined startup module and opaque configuration data. ```text port = 80 listen = 192.168.128.31 docroot = /var/yaws/www_funky_org start_mod = btt mydbdir = /tmp mylogdir = /tmp/log ``` -------------------------------- ### instr() Synopsis Examples Source: https://manpages.ubuntu.com/manpages/resolute/man1/yabasic.1.html Shows the syntax for using instr() to search for a substring and get its position, including an optional starting position. ```yabasic print instr(a$,b$) ``` ```yabasic if (instr(a$,b$)) ? ``` ```yabasic pos=instr(a$,b$,x) ``` -------------------------------- ### BSPIO example: setup SPI on GPIO Source: https://manpages.ubuntu.com/manpages/resolute/man1/pigs.1.html Example invocations of the pigs bspio command to start bit banging SPI on different GPIO groups. The third example shows an error when GPIO 29 is not available, returning -41 and an error message. ```bash $ pigs bspio 9 11 12 13 50000 0 $ pigs bspio 10 11 12 13 50000 0 $ pigs bspio 29 19 20 21 50000 0 # GPIO 29 not avaialble on this Pi -41 ERROR: no permission to update GPIO ``` -------------------------------- ### setup() Source: https://manpages.ubuntu.com/manpages/resolute/man3/App::Rad.3pm.html Sets up the application's capabilities and performs initialization before running any command. Must call register_commands() or register() when overridden. ```APIDOC ## setup() ### Description This function is responsible for setting up what your program can and cannot do, plus everything you need to set before actually running any command (connecting to a database or host, check and validate things, download a document, whatever). Note that, if you override setup(), you must call "$c->register_commands()" or at least "$c->register()" so your subs are classified as valid commands. ### Method setup() ### Parameters - **$c** (Controller) - Required - The App::Rad controller object. ### Example ```perl sub setup { my $c = shift; $c->register_commands(); # EUID is 'root' if ( $> == 0 ) { $c->register('include', \&App::Rad::include); $c->register('exclude', \&App::Rad::exclude); } } ``` ``` -------------------------------- ### start_port() - get fixed start port Source: https://manpages.ubuntu.com/manpages/resolute/man3/Graph::Easy::Edge.3pm.html Returns undef if the edge does not have a fixed start port, otherwise returns the port as "side, number", for example "south, 0". ```perl my $port = $edge->start_port(); ``` -------------------------------- ### Install and configure UFW Source: https://manpages.ubuntu.com/manpages/resolute/man7/cdist-type__ufw.7.html Examples showing basic installation and a configuration with specific logging and routing policies. ```bash # Install UFW __ufw # Setup UFW with maximum logging and no restrictions on routed packets. __ufw --logging full --default_routed allow ``` -------------------------------- ### Examples of __install_mkfs usage Source: https://manpages.ubuntu.com/manpages/resolute/man7/cdist-type__install_mkfs.7.html Demonstrates creating different file systems using __install_mkfs with various parameters such as type, device, and options. ```bash # reiserfs /dev/sda5 __install_mkfs /dev/sda5 --type reiserfs # same thing with explicit device __install_mkfs whatever --device /dev/sda5 --type reiserfs # jfs with journal on /dev/sda2 __install_mkfs /dev/sda1 --type jfs --options "-j /dev/sda2" ``` -------------------------------- ### submeta usage examples Source: https://manpages.ubuntu.com/manpages/resolute/man3/Bio::Seq::Meta.3pm.html Usage examples for the submeta method, which gets or sets meta data for subsequences. Numbering starts from 1 and is inclusive; start cannot be larger than end but can be equal. If the second argument is missing, the returned values extend to the end of the sequence. The return value may be a string or an array reference. ```perl $subset_of_meta_values = $obj->submeta(10, 20, $value_string); ``` ```perl $subset_of_meta_values = $obj->submeta(10, undef, $value_string); ``` -------------------------------- ### Install package with hyphenated name Source: https://manpages.ubuntu.com/manpages/resolute/man8/zypper.8.html Example of using the double hyphen to prevent a package name starting with a hyphen from being interpreted as a command option. ```bash zypper install -- -boring-game great-game great-game-manual ``` -------------------------------- ### Install project with setup.py Source: https://manpages.ubuntu.com/manpages/resolute/man1/_toil_worker.1.html Shows the project tree including setup.py, then installs the project with pip install . from the project root. ```bash $ tree . ├── util │ ├── __init__.py │ └── sort │ ├── __init__.py │ └── quick.py ├── workflow │ ├── __init__.py │ └── main.py └── setup.py 3 directories, 6 files $ pip install . ``` -------------------------------- ### setUp() Source: https://manpages.ubuntu.com/manpages/resolute/man3/petsc4py.3.html Returns the data structure. Collective. ```APIDOC ## setUp() ### Description Return the data structure. Collective. ### Parameters None ### Return Type _Self_ ### See Also - DMSetUp ``` -------------------------------- ### Manage systemd units with __systemd_unit Source: https://manpages.ubuntu.com/manpages/resolute/man7/cdist-type__systemd_unit.7.html Examples showing how to install, enable, start, disable, and remove systemd units using the __systemd_unit type. ```bash # Installs, enables and starts foobar.service __systemd_unit foobar.service \ --source "${__manifest}/files/foobar.service" \ --enablement-state enabled \ --restart # Disables the unit __systemd_unit foobar.service --enablement-state disabled # Stops, disables and uninstalls foobar.service __systemd_unit foobar.service --state absent ``` -------------------------------- ### /plugins install examples Source: https://manpages.ubuntu.com/manpages/resolute/man1/profanity-plugins.1.html Install a plugin from a local path or a remote URL. The plugin name is based on the basename of the path or URL. ```bash /plugins install /home/steveharris/Downloads/metal.py ``` ```bash /plugins install https://raw.githubusercontent.com/profanity-im/profanity-plugins/master/stable/sounds.py ``` -------------------------------- ### tokenize_end: Get end byte offset Source: https://manpages.ubuntu.com/manpages/resolute/man3/JSON::Tokenize.3pm.html Example call for the tokenize_end function, which returns the end of the token as a byte offset from the start of the string. ```perl my $end = tokenize_end ($token); ``` -------------------------------- ### offsetof with member expression without suffix Source: https://manpages.ubuntu.com/manpages/resolute/man3/Convert::Binary::C.3pm.html Example of using offsetof with a member expression after removing the offset suffix to get the start offset. ```APIDOC ## offsetof with member expression without suffix ### Description Demonstrates removing the offset suffix from a member expression to get the offset where the member starts. ### Method offsetof ### Parameters - TYPE: 'foo' (string) - Required - The standard type. - MEMBER: $member (string) - Required - The member expression without the offset suffix. ### Request Example ```perl $member =~ s/\+\d+$//; $offset = $c->offsetof('foo', $member); print "'$member' starts at offset $offset of struct foo"; ``` ### Response Prints the member and its start offset, e.g., "'.array[8].y' starts at offset 42 of struct foo". ``` -------------------------------- ### setup Source: https://manpages.ubuntu.com/manpages/resolute/man3/Test::PostgreSQL.3pm.html Sets up the PostgreSQL instance. Must be invoked before 'start'. ```APIDOC ## setup ### Description Setups the PostgreSQL instance. Note that this method should be invoked _before_ "start". ### Method setup ### Parameters None. ### Returns - **boolean** - True on success, false on failure. ``` -------------------------------- ### setup_installer Source: https://manpages.ubuntu.com/manpages/resolute/man3/Dist::Zilla::Plugin::MakeMaker::Awesome.3pm.html The main entry point via the Dist::Zilla::Role::InstallTool role. Sets up the test/bin/share dirs and exe_files, which will all be passed to _build_WriteMakefile_args later. ```APIDOC ## setup_installer ### Description The main entry point via the Dist::Zilla::Role::InstallTool role. Sets up the test/bin/share dirs and exe_files, which will all be passed to _build_WriteMakefile_args later. ### Method setup_installer ### Parameters None ### Return Value None ``` -------------------------------- ### start() usage example Source: https://manpages.ubuntu.com/manpages/resolute/man3/Bio::Search::Hit::GenericHit.3pm.html Shows how to call start() to get the start coordinate for query, hit, or both sequences. In scalar context returns an integer; in array context without args returns a list of two integers. Accepts 'query', 'hit', or 'sbjct' (default 'query'). ```perl Usage : $sbjct->start( [seq_type] ); Purpose : Gets the start coordinate for the query, sbjct, or both sequences : in the BlastHit object. If there is more than one HSP, the lowest start : value of all HSPs is returned. Example : $qbeg = $sbjct->start('query'); : $sbeg = $sbjct->start('hit'); : ($qbeg, $sbeg) = $sbjct->start(); Returns : scalar context: integer : array context without args: list of two integers (queryStart, sbjctStart) : Array context can be "induced" by providing an argument of 'list' or 'array'. Argument : In scalar context: seq_type = 'query' or 'hit' or 'sbjct' (default = 'query') ('sbjct' is synonymous with 'hit') Throws : n/a ``` -------------------------------- ### Start CPAN shell with perl -MCPAN -e shell Source: https://manpages.ubuntu.com/manpages/resolute/man1/perlutil.1.html Command-line invocation to start the CPAN shell, similar to the command line mode of the CPAN module. Useful for installing modules or distributions from CPAN or getting information about them. ```bash perl -MCPAN -e shell ``` -------------------------------- ### Configuration: example option example Source: https://manpages.ubuntu.com/manpages/resolute/man3/Catmandu::Importer::XSD.3pm.html Shows how to use the 'example' option to generate an example output document structure based on the XSD schema. ```bash catmandu convert XSD --root {}shiporder --schemas "t/demo/ead/*xsd" --example 1 to YAML ``` -------------------------------- ### setUp() Source: https://manpages.ubuntu.com/manpages/resolute/man3/petsc4py.3.html Constructs data structures for the partitioner. Collective operation. ```APIDOC ## setUp() ### Description Construct data structures for the partitioner. Collective. ### Return Type None ### See Also - PetscPartitionerSetUp ``` -------------------------------- ### comment_str attribute example Source: https://manpages.ubuntu.com/manpages/resolute/man3/Text::CSV_XS.3pm.html Shows how to set, clear, and get the comment_str attribute. Lines starting with this string are skipped as comments when parsing. It cannot start with special characters like sep_char, quote_char, escape_char, sep, quote, or eol. ```perl my $csv = Text::CSV_XS->new ({ comment_str => "#" }); $csv->comment_str (undef); my $s = $csv->comment_str; ``` -------------------------------- ### Curses::UI basic usage synopsis Source: https://manpages.ubuntu.com/manpages/resolute/man3/Curses::UI.3pm.html Shows the minimal setup for a Curses::UI application: creating a new object with options and starting the main event loop. The example includes a placeholder comment for widget setup. ```perl use Curses::UI; # create a new C::UI object my $cui = Curses::UI->new( -clear_on_exit => 1, -debug => $debug, ); # this is where we gloss over setting up all the widgets and data # structures :) # start the event loop $cui->mainloop; ``` -------------------------------- ### Run setup-plt --help to list command-line options Source: https://manpages.ubuntu.com/manpages/resolute/man1/setup-plt.1.html Use this command to display the list of command-line options for setup-plt. ```shell setup-plt --help ``` -------------------------------- ### Complete apt-cudf.conf configuration example Source: https://manpages.ubuntu.com/manpages/resolute/man5/apt-cudf.conf.5.html A full example configuration file defining criteria for specific solvers and a default fallback. ```text solver: mccs-cbc , mccs-lpsolve upgrade: -lex[-new,-removed,-notuptodate] dist-upgrade: -lex[-notuptodate,-new] install: -lex[-removed,-changed] remove: -lex[-removed,-changed] trendy: -lex[-removed,-notuptodate,-unsat_recommends,-new] paranoid: -lex[-removed,-changed] solver: * upgrade: -new,-removed,-notuptodate dist-upgrade: -notuptodate,-new install: -removed,-changed remove: -removed,-changed trendy: -removed,-notuptodate,-unsat_recommends,-new paranoid: -removed,-changed ``` -------------------------------- ### glGrib::glfw Perl Extension Usage Source: https://manpages.ubuntu.com/manpages/resolute/man3/glGrib::glfw.3pm.html Example usage of the glGrib::glfw Perl extension, demonstrating the start, set, get, and stop methods. ```APIDOC ## glGrib::glfw Perl Extension ### Description Provides a Perl interface to control glGrib visualization. The extension allows starting, stopping, setting, and getting visualization parameters. ### Methods #### start - **Signature**: 'glGrib::glfw'->start (arguments...) - **Description**: Starts the glGrib visualization with the given command-line arguments. - **Parameters**: - arguments (string) - Optional - Command-line arguments for glGrib, e.g., '--grid.on', '--landscape.on'. #### set - **Signature**: 'glGrib::glfw'->set (arguments...) - **Description**: Sets visualization parameters. - **Parameters**: - arguments (string) - Required - Parameters to set, e.g., '--grid.off'. #### get - **Signature**: 'glGrib::glfw'->get (arguments...) - **Description**: Gets visualization parameters. - **Parameters**: - arguments (string) - Required - Parameters to get, e.g., '--view'. - **Returns**: A reference to an array containing the requested parameter values. #### stop - **Signature**: 'glGrib::glfw'->stop () - **Description**: Stops the glGrib visualization. ### Example ```perl use glGrib::glfw; 'glGrib::glfw'->start ('--grid.on', '--landscape.on'); sleep (2); 'glGrib::glfw'->set ('--grid.off'); sleep (2); use Data::Dumper; print STDERR &Dumper (['glGrib::glfw'->get ('--view')]); 'glGrib::glfw'->stop (); ``` ``` -------------------------------- ### Example Script Configuration File Source: https://manpages.ubuntu.com/manpages/resolute/man8/systemtap-service.8.html A sample configuration file showing how to set options and dependencies for multiple scripts. ```bash script1_OPT="-o /var/log/script1.out" script2_OPT="-o /var/log/script2.out" script2_REQ="script1" ``` -------------------------------- ### Remove prefix with shift($prefix) Source: https://manpages.ubuntu.com/manpages/resolute/man3/Template::Plugin::String.3pm.html Removes the prefix passed as an argument from the start of the string. The example removes 'foo ' from 'foo bar' to get 'bar'. ```template-toolkit [% USE String 'foo bar' %] [% String.shift('foo ') %] # => 'bar' ``` -------------------------------- ### $c->setup_plugins Source: https://manpages.ubuntu.com/manpages/resolute/man3/Catalyst.3pm.html Sets up plugins. ```APIDOC ## $c->setup_plugins ### Description Sets up plugins. ```