Modules in Crystal allow you to group methods and classes together based on related functionality. do_stuff(*stuff_and_things)' ) }}continue reading
Crystal is a object orientated language. Classes are the blueprints from which objects can be created. Class Definition Class Methods Class methods allow you to add behaviour to a class. Variable Access By default, class variables are not accessible from outside the class. You cannot...continue reading
Modules in Crystal allow you to group methods and classes together based on related functionality. They provide a namespace to help avoid naming collisions and can also be used to mixin functionality. Module Definition Top Level Variables Modules can have top level variables. Top Level...continue reading
Like many other languages, Crystal has a few methods of controlling a programs flow of execution. if/elsif/else if and elsif conditions are evaluated on being truthy or falsy unless unless can be though if as a synonym for if not. case/when case/when blocks are usually...continue reading
Crystal has a set of looping structures similar to what can be found in other languages. Each An each loop is similar to a for loop in other languages. Times times allows you to iterate for N number of iterations. While/Loop while and loop have similar behaviour and start an...continue reading
Method A Method in Crystal is like a fuction in other languages. Overloading Methods in Crystal can be overloaded. This means that methods with the same name but different signatures are treated as different methods. Default Parameters Methods can have default parameters. Splat ...continue reading
Method A Method in Crystal is like a fuction in other languages. Overloading Methods in Crystal can be overloaded. This means that methods with the same name but different signatures are treated as different methods. Default Parameters Methods can have default parameters. Splat ...continue reading
Arrays in Crystal are an ordered collection of elements, generally of the same type. Although, it is possible to have an array of multiple types. Creating an array Iterating an Array Accessing Elements Array Operations Static Arrays If the size of an array is fixed it is much more...continue reading
Like most languages, variables in Crystal are defined with the = operator. Considerations Variable types are inferred by the compiler and do not have to be specifically defined. When a variable type is declared, it must be assigned a value before it can be accessed. There are no global...continue reading
Hashes in Crystal are a collection of key/value pairs of defined types. Creating a hash # Deduce the type signature of a hash. typeof(stuff_and_things) # => Hash(String, String) # To create an empty hash, you must define # the intended type of its key/value pairs. # There are 2 ways to define...continue reading
Crystal is an exciting sounding language which is: "As slick as Ruby and as fast as C." In this post I will show you how install the Crystal programming language on Ubuntu 2004. Code versions used in this post Ubuntu - 2004 Crystal - 1.1.0 Crystal Repository First, add the Crystal...continue reading
PowerShell can be used to codify Microsoft Windows environments. This post covers the basics of getting started with PowerShell. Software The following software was used in this post. Windows - 10 PowerShell - 5.1.19041.1023 Cmdlets Get a list of cmdlets Getting Help Get help for a...continue reading
I have an annoying issue. After my laptop goes to sleep, the network adapters for my VMware virtual machines stop working. In this post i'll show you how to use PowerShell to kick them in the guts and get them going again. How Open up a PowerShell window as Administrator and run the ...continue reading
Have you ever tried to SSH to an network device and recieved the dreaded Unable to negotiate with <user> port 22: no matching key exchange method found. Their offer: <key-algorithm>. In this post ill cover how to work around this issue. Key Algorithms Specify the Key...continue reading
Tune in for a fun fact about claiming Meraki devices in the Meraki portal. How To Claim Devices There are two ways to "claim" Meraki devices in the Meraki portal. via serial number via order number I found this out on a project where a couple of AP's were mounted on a 30ft high...continue reading
https://codingpackets.com/blog/go-notes-pointers