Archive
Posts in Web
Decoding JSON Web Tokens (JWTs) from the Linux command line
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
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 →How to get around the PHP strftime() It is not safe to rely on the system's timezone settings warning
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 ...
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 →Running an SSH client inside your Firefox web browser
I recently came across FireSSH, which is an SSH client that runs inside Firefox. The FireSSH plug-in allows you to create an SSH connection to a remote host using just a web browser, and I can see all kinds of uses for this! The plug-in is written entirely in javascript, and uses a couple of features that require Firefox 4 (Firefox 4 rocks, so upgrading to it should be a no brainer). To access the plug-in, you will first need to surf over to the mozilla plug-in site and install it using your choice of installation options…
$ read more →