Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in Web

Decoding JSON Web Tokens (JWTs) from the Linux command line

webJul 14, 2020 1 min read

Over the past few months I've been spending some of my spare time trying to understand OAUTH2 and OIDC. At the core of OAUTH2 is the concept of a bearer token. The most common form of bearer token is the JWT (JSON Web Token), which is a string with three hexadecimal components separated by periods (e.g., XXXXXX.YYYYYYYY.ZZZZZZZZ). There are plenty of online tools available to decode JWTs, but being a command line warrior I wanted something I could use from a bash prompt…

$ read more →

How to easily create a JSON file from a YAML file

webOct 5, 2019 2 min

If you work with with modern orchestration and configuration management systems you are most likely dealing with YAML and JSON on a daily basis. During testing, it is periodically useful to convert between these two formats, especially when interacting directly with API gateways. The yq Go program makes this incredibly easy and it has become a staple in my utility belt! To get started with yq you can snag it from github: Once downloaded you can review the available options by running yq without any arguments: The yq project was started to provide a tool that worked like jq but operates on YAML instead of JSON…

$ read more →

My Understanding Of Javascript Type Coercion

webNov 29, 2017 1 min

This week I got to debug a fun Javascript bug. I was using the double equal signs to compare two arguments and under certain cases the code would produce an error. After a bit of digging I learned about Javascript type coercion and the differences between double equals and triple equals. To illustrate the issue lets fire up node and create two variables: The first variable listed above is an integer with the value 23…

$ read more →

How to get around the PHP strftime() It is not safe to rely on the system's timezone settings warning

webmonitoringFeb 15, 2012 1 min

When I was playing around with the LogAnalyzer Statistics page I received the following error in each of the display boxes: In the error message it provides two solutions to address this issue: Use the date.timezone php.ini entry. Call date_default_timezone_set() to set the timezone. I went with #1 and set date.timezone to the following: I restarted Apache and everything is now working. I like easy fixes…

$ read more →

Free video tutorials for C, Java, PHP, HTML5, Python, MySQL and more ...

webJan 25, 2012 1 min

I just came across the new boston video tutorial series. I've watched 20 of the PHP videos and am hooked. The production quality is great, and the content is really, really good! Once I finish the 200 PHP videos I plan to watch their MySQL and HTML5 videos…

$ read more →