Face it, backticks are a pain. BASH $() construct provides a simpler, more effective approach. This talk uses examples from automating git branches and command line processing with getopt(1) to show how $() works in shell scripts.
Starting with the system calll "getrusage", this returns synchronous, process-level information, mainly max RSS used. This talk describes the output from getrusage, the rusage formatting utility in ProcStats, and several examples of using it to examine time and memory use.
Optional first & final outputs to give baseline and total status, differencing avoids extraneous output, and user messages allow arbitrary stat's and tracking content.
The combination makes this nice for tracking both long-lived and shorter, more intensive processing.
This talk describes refactoring FindBin::libs from Perl5 to Raku: breaking the module up into functional pieces, writing the tests using Raku, testing and releasing the module with mi6.
Variable interpolation is a standard way to BASH your head. This talk looks at interpolation, eval, ${} handling and "set -vx" to debug basic variable handling.
The $path to knowledge: What little it take to unit-test Perl.Workhorse Computing
Metadata-driven lazyness, Perl, and Jenkins provide a nice mix for automated testing. With Perl the only thing required to start testing is a files path, from there the possibilities are endless. Using Symbol's qualify_to_ref makes it easy to validate @EXPORT & @EXPORT_OK, knowing the path makes it easy to use "perl -wc" to get diagnostics.
The beautiful thing is all of it can be lazy... er, "automated". And repeatable. And simple.
The Perforce Web Content Management System development team, lacking a pre-existing solution in PHP, designed and implemented their own object model and record layer to ease the interaction of the system with the Perforce Server. This session will focus on how users can access files in Perforce via a simple CRUD API, the subsystems exposed, and their usage.
Face it, backticks are a pain. BASH $() construct provides a simpler, more effective approach. This talk uses examples from automating git branches and command line processing with getopt(1) to show how $() works in shell scripts.
Starting with the system calll "getrusage", this returns synchronous, process-level information, mainly max RSS used. This talk describes the output from getrusage, the rusage formatting utility in ProcStats, and several examples of using it to examine time and memory use.
Optional first & final outputs to give baseline and total status, differencing avoids extraneous output, and user messages allow arbitrary stat's and tracking content.
The combination makes this nice for tracking both long-lived and shorter, more intensive processing.
This talk describes refactoring FindBin::libs from Perl5 to Raku: breaking the module up into functional pieces, writing the tests using Raku, testing and releasing the module with mi6.
Variable interpolation is a standard way to BASH your head. This talk looks at interpolation, eval, ${} handling and "set -vx" to debug basic variable handling.
The $path to knowledge: What little it take to unit-test Perl.Workhorse Computing
Metadata-driven lazyness, Perl, and Jenkins provide a nice mix for automated testing. With Perl the only thing required to start testing is a files path, from there the possibilities are endless. Using Symbol's qualify_to_ref makes it easy to validate @EXPORT & @EXPORT_OK, knowing the path makes it easy to use "perl -wc" to get diagnostics.
The beautiful thing is all of it can be lazy... er, "automated". And repeatable. And simple.
The Perforce Web Content Management System development team, lacking a pre-existing solution in PHP, designed and implemented their own object model and record layer to ease the interaction of the system with the Perforce Server. This session will focus on how users can access files in Perforce via a simple CRUD API, the subsystems exposed, and their usage.
We have all seen repetitive code, maintained by cut+paste, that creates an object, calls a method, checks a return, calls a method, checks a return... all of it difficult to maintain because of its sheer size.
Object::Exercise replaces the pasted loops with data-driven code, the operation controlled by a data structure of methods, arguments, and expected return values. This replaces cut+paste with declarative data.
This talk describes O::E and shows a few ways to apply it for testing the MadMongers' Adventure game.
A short introduction to the perl debugger's basic commands for executing code, examining data structures. Includes examples of hardwiring breakpoints, tracing sections of code, debugging regexen.
Building a Perl5 smoketest environment in Docker using CPAN::Reporter::Smoker. Includes an overview of "smoke testing", shell commands to contstruct a hybrid environment with underlying O/S image and data volumes for /opt, /var/lib/CPAN. This allows maintaining the Perly smoke environemnt without having to rebuild it.
(originally presented at YAPC::Europe::2007)
No-one is as critical about something as those that love it dearly. Mark Fowler has been collecting complaints from professional Perl developers for years about what warts still remain with the language when strict and warnings are turned on.
Are these problems unsolvable? A veteran Perl programmer himself Mark attempted to try and solve these issues - and then turned to the experts, the people who write books on Perl, the people who maintain the perl interpreter itself, for help.
This is what he learned...
Object Trampoline: Why having not the object you want is what you need.Workhorse Computing
Overview of Trampoline Objects in Perl with examples for lazy construction, lazy module use, added sanity checks. This version includes corrections from the original presented at OSCON 2013 and comments.
vfsStream - a better approach for file system dependent testsFrank Kleine
Have you ever been annoyed by testing classes or functions operating on the file system? Be it tests that rely on presence of physical files, the problem of not cleaning up correctly after the test run or checking that your algorithm creates the correct directories and files with correct file permissions. Then this is for you: vfsStream to the rescue!
We have all seen repetitive code, maintained by cut+paste, that creates an object, calls a method, checks a return, calls a method, checks a return... all of it difficult to maintain because of its sheer size.
Object::Exercise replaces the pasted loops with data-driven code, the operation controlled by a data structure of methods, arguments, and expected return values. This replaces cut+paste with declarative data.
This talk describes O::E and shows a few ways to apply it for testing the MadMongers' Adventure game.
A short introduction to the perl debugger's basic commands for executing code, examining data structures. Includes examples of hardwiring breakpoints, tracing sections of code, debugging regexen.
Building a Perl5 smoketest environment in Docker using CPAN::Reporter::Smoker. Includes an overview of "smoke testing", shell commands to contstruct a hybrid environment with underlying O/S image and data volumes for /opt, /var/lib/CPAN. This allows maintaining the Perly smoke environemnt without having to rebuild it.
(originally presented at YAPC::Europe::2007)
No-one is as critical about something as those that love it dearly. Mark Fowler has been collecting complaints from professional Perl developers for years about what warts still remain with the language when strict and warnings are turned on.
Are these problems unsolvable? A veteran Perl programmer himself Mark attempted to try and solve these issues - and then turned to the experts, the people who write books on Perl, the people who maintain the perl interpreter itself, for help.
This is what he learned...
Object Trampoline: Why having not the object you want is what you need.Workhorse Computing
Overview of Trampoline Objects in Perl with examples for lazy construction, lazy module use, added sanity checks. This version includes corrections from the original presented at OSCON 2013 and comments.
vfsStream - a better approach for file system dependent testsFrank Kleine
Have you ever been annoyed by testing classes or functions operating on the file system? Be it tests that rely on presence of physical files, the problem of not cleaning up correctly after the test run or checking that your algorithm creates the correct directories and files with correct file permissions. Then this is for you: vfsStream to the rescue!
This is the seventh set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This presentation is for those students and IT professionals who have basic programming knowledge and want to learn Perl basics for Pentesting.
We have explained minimal Perl basics which a pentester should know to write,read,modify Perl scripts for Pentesting like data type, comparison operator, loop controls, minimal CPAN modules related to web and networking, perl scripts in Kali and some demo
Raphaël Pinson's talk on "Configuration surgery with Augeas" at PuppetCamp Geneva '12. Video at http://youtu.be/H0MJaIv4bgk
Learn more: www.puppetlabs.com
Can't Miss Features of PHP 5.3 and 5.4Jeff Carouth
If you're like me you remember the days of PHP3 and PHP4; you remember when PHP5 was released, and how it was touted to change to your life. It's still changing and there are some features of PHP 5.3 and new ones coming with PHP 5.4 that will improve your code readability and reusability. Let's look at some touted features such as closures, namespaces, and traits, as well as some features being discussed for future releases.
Similar to Utility Modules That You Should Know About (20)
Slides from a talk on getting started with testing in Perl. The presentation was given at Frozen Perl 2008. This slideshow is a preview of a course taught be Stonehenge Consulting (http://www.stonehenge.com)
YAPC::NA 2007 - An Introduction To Perl Criticjoshua.mcadams
If you ever dreamed of having an instant code from some of Perl's top coders, Perl Critic may very well be the closest tool that you'll ever find. This talk will introduce you to Perl Critic, a static source code analyzer for your code. Learn about the ideas behind Perl Critic, the implementation of the system, and how to apply it and improve the quality and consistency of your code.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
4. use strict;
use strict quot;refsquot;;
$perl = 'frozen';
$ref = 'perl';
print $$ref, quot;nquot;;
$ perl strict_refs.pl
Can't use string (quot;perlquot;) as a SCALAR ref while quot;strict refsquot; in use
at strict_refs.pl line 4.
5. use strict;
use strict quot;varsquot;;
$perl = 'frozen';
$ref = 'perl';
print $$ref, quot;nquot;;
$ perl strict_vars.pl
Global symbol quot;$perlquot; requires explicit package name at strict_vars.pl line 2.
Global symbol quot;$refquot; requires explicit package name at strict_vars.pl line 3.
Global symbol quot;$refquot; requires explicit package name at strict_vars.pl line 4.
Execution of strict_vars.pl aborted due to compilation errors.
6. use strict;
use strict quot;varsquot;;
our $perl = 'frozen';
my $ref = 'perl';
print $$ref, quot;nquot;;
$ perl strict_vars.pl
frozen
7. use strict;
use strict quot;subsquot;;
$person = Josh;
$directory{mcadams} = [ first => $person ];
print $directory{mcadams}->[1], quot;nquot;;
$ perl strict_subs.pl
Bareword quot;Joshquot; not allowed while quot;strict subsquot; in use at
strict_subs.pl line 2.
Execution of strict_subs.pl aborted due to compilation errors.
8. use strict;
use strict quot;subsquot;;
$person = ‘Josh’;
$directory{mcadams} = [ first => $person ];
print $directory{mcadams}->[1], quot;nquot;;
$ perl strict_subs.pl
Josh
9. use strict;
- Typically ‘use strict;’ is all that you’ll need
- You can ‘no strict “refs”;’ in your code
- Use the strict pragma in all of your Perl code
17. use constant;
use warnings;
use strict;
use constant DO_NOT_DISTURB => 1;
print quot;leave me alonenquot; if DO_NOT_DISTURB;
> perl constant.pl
leave me alone
20. use Exporter;
package MyPackage;
use warnings;
use strict;
use Exporter qw(import);
our @EXPORT_OK = qw(my_subroutine);
sub my_subroutine {
print quot;hellonquot;;
}
1;
28. use Carp;
1 package PackageOne;
2
3 sub y { z(); }
4 sub z { die('oops'); }
5
6 package PackageTwo;
$ perl die.pl
7
oops at die.pl line 4.
8 sub a { b(); }
9 sub b { PackageOne::y(); }
10
11 package main;
12
13 PackageTwo::a();
29. use Carp;
1 package PackageOne;
2
3 use Carp;
4
5 sub y { z(); }
6 sub z { croak('oops'); }
7
$ perl croak.pl
8 package PackageTwo; oops at croak.pl line 11
9
10 sub a { b(); }
11 sub b { PackageOne::y(); }
12
13 package main;
14
15 PackageTwo::a();
30. use Carp;
1 package PackageOne;
2
3 use Carp qw(confess);
4 $ perl confess.pl
5 sub y { z(); } oops at confess.pl line 6
6 sub z { confess('oops'); } PackageOne::z() called at
7 confess.pl line 5
PackageOne::y() called at
8 package PackageTwo; confess.pl line 11
9 PackageTwo::b() called at
10 sub a { b(); } confess.pl line 10
11 sub b { PackageOne::y(); } PackageTwo::a() called at
12 confess.pl line 15
13 package main;
14
15 PackageTwo::a();
31. use Carp;
caller’s
standard full stacktrace
perspective
warn carp cluck
die croak confess
37. use File::Spec;
use warnings;
use strict;
use File::Spec;
my @dirs = File::Spec->splitdir($0);
print '[', join('][', @dirs), quot;]nquot;;
my $dir = File::Spec->join(@dirs);
print $dir, quot;nquot;;
> perl /Users/joshua/examples/filespec.pl
[][Users][joshua][examples][filespec.pl]
/Users/joshua/examples/filespec.pl
49. use File::Temp;
use warnings;
use strict;
use File::Temp;
my $fh = File::Temp->new( UNLINK => 1 );
print $fh->filename, quot;nquot;;
> perl tempfile.pl
/tmp/yZin81tl6z
50. use File::Temp;
use warnings;
use strict;
use File::Temp;
my $fh = File::Temp->newdir( CLEANUP => 1 );
print $fh->dirname, quot;nquot;;
> perl tempdir.pl
/tmp/HggvehyAyw
52. use File::Find;
use warnings;
use strict;
use File::Find;
find( sub { print quot;$File::Find::namenquot; },
'/Users/joshua/' );
> perl filefind.pl
/Users/joshua/...
54. use File::Next;
use warnings;
use strict;
use File::Next;
my $files = File::Next::files( '/Users/joshua/' );
while ( defined ( my $file = $files->() ) ) {
print quot;$filenquot;;
}
> perl filenext.pl
/Users/joshua/...
58. use File::HomeDir;
use warnings;
use strict;
use File::HomeDir;
print File::HomeDir->my_home(), quot;nquot;;
print File::HomeDir->my_data(), quot;nquot;;
> perl filehomedir.pl
/Users/joshua
/Users/joshua/Library/Application Support
64. use FindBin;
use warnings;
use strict;
use lib 'mylib';
use MyModule;
MyModule::hello();
> perl findbin.pl
hello
65. use FindBin;
> perl ~/bin/findbin.pl
Can't locate MyModule.pm in @INC (@INC contains: mylib /
opt/local/lib/perl5/5.8.8/darwin-2level /opt/local/lib/
perl5/5.8.8 /opt/local/lib/perl5/site_perl/5.8.8/
darwin-2level /opt/local/lib/perl5/site_perl/5.8.8 /opt/
local/lib/perl5/site_perl /opt/local/lib/perl5/
vendor_perl/5.8.8/darwin-2level /opt/local/lib/perl5/
vendor_perl/5.8.8 /opt/local/lib/perl5/vendor_perl .) at
Utility Modules That You Should Know About/findbin.pl line
4.
BEGIN failed--compilation aborted at Utility Modules That
You Should Know About/findbin.pl line 4.
66. use FindBin;
use warnings;
use strict;
use FindBin;
use lib quot;$FindBin::Bin/../mylibquot;;
use MyModule;
MyModule::hello();
68. use Getopt::Long;
use Getopt::Long;
GetOptions(
'greeting=s',
'person=s',
'prefix:s' ) or die('error');
print join( q[ ],
$opt_greeting,
($opt_prefix || q[]),
$opt_person), quot;nquot;;
> perl getopt1.pl --greeting=hello --person=josh --prefix=
hello josh
69. use Getopt::Long;
use warnings;
use strict;
use Getopt::Long;
my ($greeting, $person, $prefix);
GetOptions(
'greeting=s' => $greeting,
'person=s' => $person,
'prefix:s' => $prefix,
) or die('error');
print join( q[ ],
$greeting,
($prefix || q[]),
$person), quot;nquot;;
70. use Getopt::Long;
use warnings;
use strict;
use Getopt::Long;
my %options;
GetOptions( %options,
'greeting=s',
'person=s',
'prefix:s',
) or die('error');
print join( q[ ],
@options{
qw(greeting prefix person)
} ),
quot;nquot;;
72. use Pod::Usage;
use Getopt::Long;
use Pod::Usage;
GetOptions('help', 'man') or pod2usage(2);
pod2usage(1) if $opt_help;
pod2usage(-verbose => 2) if $opt_man;
__END__
73. use Pod::Usage;
=head1 NAME
sample - Using GetOpt::Long and Pod::Usage
=head1 SYNOPSIS
sample [options]
Options:
-help brief help message
-man full documentation
=head1 OPTIONS
=over 8
=item B<-help>
Print a brief help message and exits.
=item B<-man>
Prints the manual page and exits.
=back
=head1 DESCRIPTION
Sample is exactly that, a sample.
=cut
74. use Pod::Usage;
> perl pod_usage.pl -h
Usage:
pod_usage [options]
Options:
-help brief help message
-man full documentation
Options:
-help Print a brief help message and exits.
-man Prints the manual page and exits.
75. use Pod::Usage;
> perl pod_usage.pl -m
POD_USAGE(1) User Contributed Perl Documentation POD_USAGE(1)
NAME
pod_usage - Using GetOpt::Long and Pod::Usage
SYNOPSIS
pod_usage [options]
Options:
-help brief help message
-man full documentation
OPTIONS
-help Print a brief help message and exits.
-man Prints the manual page and exits.
DESCRIPTION
pod_usage just an example.
perl v5.8.8 2008-02-16 POD_USAGE(1)