tech

Regex – Regular Expression

Posted on

A regular expression or regex is a pattern defined by a group of characters to match a certain string. It can help you find patterns in a text or do replacements for specific character sequences. Here a short of overview of some common regex syntax   Examples Here are some examples of regular expressions. You […]

tech

Floating point numbers

Posted on

You certainly heard people speaking about 32 bit  or 64 bit computers. Now what does it mean to store a number in a 32 bit representation? Instead of going very deep into it I am going to give an high level overview and some examples. There are enough websites out there with a lot of info […]

HowTo

How To: search with grep

Posted on

To search through text you can use the grep command. It searches files and returns the lines of the file that match a certain string. The command has the following format: grep [options] pattern [file]     Here are some of the useful options I use:   Examples You can also search multiple files eg. all files […]

Python

Python fun!

Posted on

Recently dove into Python and wanted to share the fun!   Playing with the Chuck Norris API and writing chuck quotes to a file: import requests URL = ‘https://api.chucknorris.io/jokes/random’ outFile = ‘chucknorris.html’ open(outFile, ‘w’).close() with open(outFile,’a’) as o: for i in range(1000): json_response = requests.get(URL).json() o.write(‘<h4>’ + json_response[‘value’] + ‘</h4>\n’) print(json_response[‘value’])   Surrounding each line […]

AWS

CloudFormation

Posted on

I wanted to compare CloudFormation and SAM with Terraform which I know from work. The following tutorials are really great if you want to get started with CloudFormation: How CloudFormation works — by tongueroo: Youtube BlogPost Getting started with AWS SAM — by Foo Bar: Youtube For a deeper dive, more info and sample templates:  AWS docs

Tutorial

JavaScript: async / await

Posted on

As a Java developer it speaks for itself that I’m using Java most of the time. Recently I had to develop an AWS Lambda using Node.js. I had a great time learning about JavaScript. I learned about promises, async/await and functional programming in JavaScript. I created a small code-example below. This example will fetch some […]