Keyword lists are similar to list.
They are a sequence of tuples that are enclosed
with square brackets [
Considerations
Keys must be atoms
Keys are ordered based on insertion
Keys can be declared more than once
Keyword lists are the syntax for passing parameters to...
Lists are a sequence of values that are enclosed
with square brackets [].
Lists in Elixir are actually stored in memory as linked lists.
Each element holds both its value and a pointer to the next
element.
Considerations
To compute the length of a list, the whole list needs to be...
Elixir has a number of types similar to most programming
languages.
Integer
Integers are whole numbers.
Float
Floats are decimal place numbers.
Boolean
Booleans are true
or false values.
Atom
Atoms are constants where the value is the same
as the name of the atom. Atoms are...
Maps are used to store key/value pairs. Maps are defined
with curly brackets prefixed with a percent
%
# Define a map with the hash rocket syntax
map = %
# Create a map from a list of tuples
map = Map.new([
Considerations
It is convention to use atoms as keys for maps.
When an atom is...
Tuples are similar to lists except they store all their elements
in a contiguous memory block. Tuples are defined with the
curly braces
Considerations
Updating or adding to tuples is expensive, because a new tuple is created in memory.
A module is a collection of functions that can be
used to organize your code in a manner similar to
namespacing.
Modules are defined in Elixir with the
defmodule
keyword.
Considerations
Modules must start with an uppercase [A-Z]
CamelCase is the
formatting convention...
A function is a unit of code that does a thing.
With Elixir being a functional language, functions
are a core tenant of the language.
Elixir has both named functions and anonymous functions.
Named Functions
Functions are defined in Elixir with the
def
keyword.
Anonymous Functions
...
A short post, documenting the process of
copying your SSH keys from Windows 10 to
linux host.
This will save future Brad having to go
on a duck hunt
to find this information for the 10 billionth time.
Requirements
In recent versions of Windows 10 you can
enable both an SSH...
Handy tips and tricks for working with the
Palo Alto network CLI.
Config Output Format
The configuration output format can be changed. This can be
useful for backing up the config or capturing a structured
format from the CLI.
The following formats are available:
default
json
...