@learnbyexample@programming.dev avatar

learnbyexample

@learnbyexample@programming.dev

Interests: Regular Expressions, Linux CLI one-liners, Scripting Languages and Vim

GitHub: github.com/learnbyexample

This profile is from a federated server and may be incomplete. Browse more on the original instance.

learnbyexample,
@learnbyexample@programming.dev avatar

Was going to suggest Cradle as well!

I’d add Mage Errant by John Bierce - magical academy, 4 member student group who trust each other, competent teachers, amazing worldbuilding, big battles (in later books), etc.

learnbyexample,
@learnbyexample@programming.dev avatar

github.com/WyattBlue/auto-editor - automatically editing video and audio by analyzing a variety of methods, most notably audio loudness

github.com/shssoichiro/oxipng, pngquant.org and github.com/RazrFalcon/svgcleaner for optimizing images

GNU BRE/ERE cheatsheet and differences between grep, sed and awk (learnbyexample.github.io)

Hello. I wrote this blog post to serve as a reference for BRE/ERE regexp flavors. You’ll also learn the differences between these tools — for example, awk doesn’t support backreferences within regexp definition (i.e. the search portion).

LPT: ChatGPT is incredible for generating and evaluating regex

I have to use a ton of regex in my new job (plz save me), and I use ChatGPT for all of it. My job would be 10x harder if it wasn’t for ChatGPT. It provides extremely detailed examples and warns you of situations where the regex may not perform as expected. Seriously, try it out.

learnbyexample,
@learnbyexample@programming.dev avatar

That depends on the regex flavor. Some of them have full support for variable length lookbehinds, for example JavaScript and third-party regex module for Python.

A review of CS50P (CS50’s Introduction to Programming with Python)

Many of you may be familiar with CS50, Harvard's Intro to Computer Science course - it is often recommended to newbie programmers (and basically shows up on every 'how to learn to code for free' list). However, there are other lesser-known online courses offered by Harvard's Computer Science department. Since I wanted to brush...

A Visual Guide to SSH Tunnels: Local and Remote Port Forwarding (iximiuz.com)

SSH is yet another example of an ancient technology that is still in wide use today. It may very well be that learning a couple of SSH tricks is more profitable in the long run than mastering a dozen Cloud Native tools destined to become deprecated next quarter....

Converting space separated string to array

I'm a complete noob when it comes to bash, I extracted some timestamps from an xml file using xmlstarlet however its formatted as a space separated string rather than an array. I need them as an array so that I can use them in a for loop. As far as I can tell you can't do that with xmlstarlet so I need to just convert the...

learnbyexample,
@learnbyexample@programming.dev avatar

Can't reproduce your issue:

$ line='2023-06-19T00:00:00+01:00 2023-06-18T00:00:00+01:00 2023-06-17T00:00:00+01:00 2023-06-16T00:00:00+01:00 2023-06-15T00:00:00+01:00 2023-06-14T00:00:00+01:00 2023-06-13T00:00:00+01:00 2023-06-10T00:00:00+01:00 2023-06-03T00:00:00+01:00 2023-05-31T00:00:00+01:00 2023-05-27T00:00:00+01:00'
$ arr=( $line )
$ echo "${arr[4]}"
2023-06-15T00:00:00+01:00

The Art of Command Line (github.com)

Fluency on the command line is a skill often neglected or considered arcane, but it improves your flexibility and productivity as an engineer in both obvious and subtle ways. This is a selection of notes and tips on using the command-line that we've found useful when working on Linux. Some tips are elementary, and some are...

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • magazineikmin
  • everett
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • love
  • khanakhh
  • kavyap
  • tacticalgear
  • GTA5RPClips
  • DreamBathrooms
  • provamag3
  • modclub
  • mdbf
  • normalnudes
  • Durango
  • ethstaker
  • osvaldo12
  • cubers
  • ngwrru68w68
  • tester
  • anitta
  • cisconetworking
  • Leos
  • JUstTest
  • All magazines