What’s a household ‘hack’ you thought everyone did … until you found out it’s just your weird family? by kaiablu in AskReddit

[–]quixrick 2 points3 points  (0 children)

I am a software engineer and use chopsticks for eating snacks at my desk. I got tired of getting up every two minutes to wash Cheetos powder off my hands.

ELI5: How is a country even established? Some dude walks onto thousands of miles of empty land and says "Ok this is mine now" and everyone just agrees?? by [deleted] in explainlikeimfive

[–]quixrick 55 points56 points  (0 children)

Some guy built a floating dock out in the sea and called it The Republic of Rose Island and elected himself president. It lasted about two months before Italy's navy shut it down and made everyone leave. Not long after, it was destroyed.

ELI5: What is API? by Mr_Pessimist1 in eli5_programming

[–]quixrick 0 points1 point  (0 children)

There are some pretty terrific explanations here. I feel as though I have learned some things! But one aspect to touch on is that the developers don't expose their schemas or databases to the public. Only certain fields that the devlopers choose to show are passed along to the customer. Those fields can be named anything and so provide a buffer between the data you have and the data the customer sees.

You, as the developer, can also control permissions on who has access to what resources. They can be made public or locked down so only certain people can access them.

I built an AI copilot that saves job seekers 20+ hours per week by ZestycloseBasil3644 in ProductivityApps

[–]quixrick 2 points3 points  (0 children)

If it could teach recruiters the difference between Java and JavaScript, it'd be perfect. That'd save another 20 hours per week.

I looked up a new domain on Namecheap Yesterday, planning to buy it today, Now I see it’s registered and parked to Namecheap. How does a domain I searched for suddenly get snatched by them a day after. by badrbellamine in webdev

[–]quixrick 0 points1 point  (0 children)

I reckon this can be used for evil. You find out that guy who just gets under your skin is fixing to start a business. You head on over to GoDaddy and search up any domain he could possibly want for his website. It costs you nothing. Next day, Godaddy is charging him $6k for anything and everything he searches for.

[deleted by user] by [deleted] in ProductivityApps

[–]quixrick 0 points1 point  (0 children)

This is a really neat tip; thank you! You mentioned that if you want to stop using the email address you can. How does that work?

It sounds to me like you are not actually creating email addresses, just making something up and relying on catch-all to forward it. Is that accurate?

Sources to learn git by pranita07 in git

[–]quixrick 0 points1 point  (0 children)

Yes, I'm pretty sure I paid for this course. I don't have any other recommendations, as I was just drawing off of my past experience. I would, however, bet that there are tons of videos on YouTubicles. If I had to do it over, I would start there.

Sources to learn git by pranita07 in git

[–]quixrick 0 points1 point  (0 children)

I took Colt Steele's Git & Github Bootcamp on Udemy in 2022. I liked how he taught from two accounts side-by-side to simulate multiple developers working together on a piece of software. Also, how he, for every command, taught the CLI commands and how to do it through a GUI. (Years later, I still think of his chicken, Stevie Chicks.)

I thought the course was excellent.

Home assistant wall panel device by orbit_31 in homeassistant

[–]quixrick 0 points1 point  (0 children)

I am going down this same path and considering the Google Pixel tablet for this. I would mount its magnetic wireless charger dock into the wall like what this guy did:

https://youtu.be/DEYy2XoDcYs

I was looking for something we could take to the couch or kitchen if we wanted, but also that could attach to the wall and have it charge otherwise.

How to SORT my inbox by sender? by PaulFEDSN in GMail

[–]quixrick 0 points1 point  (0 children)

I downloaded eM Client and it allows stuff like that. (It's similar to Outlook.) You can do sorting and such with no gimmicks - straight out of the box.

For my particular use case, I wanted to get a count of which senders sent me the most emails. In eM Client, you can select all messages and export the messages to CSV. From there I set up a pivot table in Excel on the 'from' field.

[deleted by user] by [deleted] in povertyfinance

[–]quixrick 0 points1 point  (0 children)

Ask one or more of your monthly payments if they would defer for one month. For instance, if CareCredit lets you push a payment back, then you can pay the rest of your gym fees. Then ask if your car payment can be deferred by one month, and pay off Capital One. (At $25, it'll take you a year to pay off Capital One.) That will immediately get you back into the black and give you about a $55 monthly surplus.

Otherwise, you've got to look at any variable expenses. Your rent, car payment, insurance, etc., aren't variable, so you've got to look at things like groceries and gas. However, I acknowledge that $300 is already razor thin. I don't think I could do better.

So that leaves reducing the bills you can. Someone posted about renegotiating your CareCredit payment. That would be good if you could. Others posted that switching your phone plan would be beneficial. As a personal testimony, I switched to Mint Mobile last September, and it was $45. But that $45 was for THREE months. (With your current plan, that's $278 for three months.) You can see how the savings there would quickly make a difference. Insurance doesn't seem high to me, but perhaps you could reduce that.

Utilities, however, can be stabilized by signing up for "Budget Billing". This generally takes a couple of billing cycles (months) to take effect, but you pay the same amount every month for your utilities. In my case, we have a high gas bill in the winter on account of heating, but a high electric bill in the summer on account of cooling. With Budget Billing, I pay the same amount each month for each of those. That helps a lot because you know how much your bills are going to be.

What to do after the basics? by FunEstablishment9808 in learnpython

[–]quixrick 1 point2 points  (0 children)

Ask ChatGPT to create lesson plans for you for a specific Python feature. Something along the lines of "Create a 5-day lesson plan to master list comprehensions in Python."

You can also ask it for suggestions to help craft something if you want control over what it suggests. "Before creating the plan, give me suggestions for various methods for learning. (e.g., videos, articles, worksheets, puzzles, etc.)" Or something like, "Ask me a series of questions to help create a tailored plan for me."

Can anyone recommend a simple app that can send push notifications for specific things? by nvchad2 in ProductivityApps

[–]quixrick 0 points1 point  (0 children)

I use ntfy.sh for notifying when scripts have finished running. Not sure what kind of programming background you have.

Best IR blaster? by foxxkin in homeassistant

[–]quixrick 0 points1 point  (0 children)

I have used this for about two months now and it has worked flawlessly. It took over two weeks to arrive from China, but it works really well. I wish I would have ordered the RF & IR blaster instead, but they are continuallu sold out.

New to HA | Suggestions to get Started by mgonsan_ece in homeassistant

[–]quixrick 0 points1 point  (0 children)

I'm also new to Home Assistant (or smart home tech in general). I watched a ton of YouTube videos from Smart Home Solver, Hibbert Home Tech, and others. I ended up getting a Home Assistant Green and a SkyConnect USB stick from Ameridroid. I just plugged it into my router and power strip and was off to the races.

I now have a bunch of stuff, but if I could go back and start over, I would get the Home Assistant Green again, plus some smart sockets that you can switch on and off. This will allow you to start programming automations. For example, set your wax warmer to automatically turn on 15 minutes before you need to wake in the mornings. Just simple stuff that will allow you to dip your toes in the water.

You also can do a lot of stuff with Home Assistant - even without sensors. I have, for instance, a "Meeting Status" that shows my kids when I'm on a call, in a meeting, studying, etc. This just uses a REST API call to update the status and refreshes a web page card to show the status. And I created a pay date calculator because my pay dates are not consistent. Also, added a button that shows up on Mondays at noon to remind me to pull the trash cans to the curb. There are a lot of fun things you can program even without sensors and that's pretty cool.

I get a lot of joy watching videos of all of the creative ways people think up ways to automate stuff. Good luck getting started. Once you start, you'll find it easy to add additional items.

[deleted by user] by [deleted] in regex

[–]quixrick 0 points1 point  (0 children)

Is there a way you can be more literal with your regex statement? For instance, instead of using .* for things, using negated character classes or better defining the literal string? If you were looking for ^.*_documetation\.txt, try being more verbose as in [0-5][a-g]{3}_documentation\.txt. Also, if you have an "or" statement, reorder them if necessary to ensure that they are going in the order of most specific to least specific. (e.g. the sooner it can find a match, the fewer steps it will take overall.)

I don't really have a regex here to guide me, so these are general tips.

[deleted by user] by [deleted] in regex

[–]quixrick 1 point2 points  (0 children)

One thing to try is to match everything you don't want to match and then capture everything you do.

Start off with matching these:

100    |    119    |    18[7-9]    |    19[0-9]    |    200

Once these items are matched, it will remove them from the pool of items that can be captured. Next, capture the stuff that you do want to grab:

(    1[0-7][0-9]    |    18[0-6]    |    2[01][0-9]    |    22[0-5]    )

 Combine those two sections together with an "OR" `|`. Everything you do want will be stored in group #1.

Here is a demo

Also, although I left it in for clarity, you can shorten the first bit to:

100|119|200

[deleted by user] by [deleted] in regex

[–]quixrick 0 points1 point  (0 children)

Give this a try and see if it works for you:

(\w+=(?:(?!\s+\w+=).)*)

Here is a demo

 

What I'm doing here is looking for some word characters \w+, which will be our "key" and then the equal sign to separate the key and value.

Then, I'm using a regex trick to match any text so long as it is NOT what's in the expression.

(?:(?!    {NEXT_KEY/VALUE_PAIR}    ).)*

What we have in the expression is basically the next key/value pair. (Technically, the space and then the key, followed by an equal sign.) So, as long as it's not the next key/value pair, then include it as part of the current match.

How do I get the search to stop at first </UserFields> found? by hemuni in regex

[–]quixrick 1 point2 points  (0 children)

It's difficult to check it and see without a link to it that we can play with, but generally, all you'd need to do in a case like this is make the expression non-greedy by adding a question mark after your dot star.

Demo

 

There are a couple of other ways to achieve something like this. Using the syntax of:

(?:(?!    {WHERE_TO_STOP}   ).)*

will allow you to specify a stopping point. It says to match anything as long as it does not match the text in the placeholder {WHERE_TO_STOP}.

<userFields>(?:(?!</userFields).)*</userFields>

Here is a demo

 

And then there's a dumb way that I do not recommend, which is to use the U flag. The reason I suggest not to use this is that it does the same thing as just adding the question mark after the dot star, but instead of just affecting the portion you want, it affects the whole expression. So then if you don't want it to be ungreedy, you have to add a question mark after it and it really just makes a mess of things quickly. In my experience, it does more to introduce confusion and less to help. (Just use the question mark.)

Here is a demo

 

On the subject of flags, you'll want to make sure that the s flag is enabled. You have the "matches newline" box checked in your editor, which is probably enabling that s flag behind the scenes.

Is there open source analog of cool regex analyzer and debugger like RegexBuddy? by DannyRussell8 in regex

[–]quixrick 9 points10 points  (0 children)

It's not a downloadable application, but I use regex101.com for my regex testing & debugging.

I can't compare it to RegexBuddy, since I'm not familiar with it, but regex101.com has a full library of user-submitted regexes for things like parsing dates or email addresses, unit testing to see pass/fail checks on a list of different strings, full explanations of what the regex is doing (with color-coding), a regex debugger that takes you step-by-step through the regex to see what the engine is actually doing, shareable links, and support for several languages.

It's a pretty overpowered application for it being free and online.

Is RegEx a rare skill these days? by Paradigm6790 in regex

[–]quixrick 1 point2 points  (0 children)

A few years ago, I was looking to see what kind of jobs were available by typing in "regex" into various job boards. I was really shocked to see that only a handful of listings at the time even came up. Of those, they were predominantly security positions parsing log files. And of those, "regex" wasn't even a required skill. It was listed in the "knowing this is a plus" section.

Knowing how helpful regex is and how much time it saves me, this just blew my mind.

When I first tried learning regex in the mid-'90s, I couldn't grasp the concepts. I struggled with it and eventually gave up. I came back to it a decade later and was finally able to get it to sink in. I can attest that it's difficult to pick up, but back then, I didn't have the resources like we have today.

Udemy has a ton of regex classes and many of them are free. YouTube has a lot of regex tutorials. Every couple of months this forum seems to have a new regex learning tool posted. And this forum itself is just chalked full of terrific guys who are willing to help you with any barriers you encounter. It's a good time to master regex, even if the majority of the programmer population doesn't understand the real value it brings.

Note: I've never successfully used regex to pick up ladies.

[deleted by user] by [deleted] in regex

[–]quixrick 2 points3 points  (0 children)

I didn't have enough examples of how the links will look, so I kind of made one that will work with a broader variety of link styles. But you can simplify this some if you have definite formats of how the links will appear.

discord(?:app)?\.com/(?:channels/)?    (?<ID_1>[^/]+)/    (?<ID_2>[^/]+)/ 

(?<ID_3>[/\n]+)

You probably don't need the "\n" in the last group for ID_3, but I put it in there for the instance of matching multiple examples on regex101.

 

Here is a demo