The lounge was spacious and quiet, with local art surrounding the open plan interior. Upon entering, we were greeted warmly by the attendant, who informed us that our PriorityPass membership gave us access to a selection of free snacks and beverages.
Man I love regex.
Select everything after the “>” character:
\ > (.*)
Select everything before the “>” character:
I wrote a snippet at work today for the following scenario: we have an environment at work where websites are owned by separate users and groups. In order to modify files in the site directories, our usernames must belong to these groups. It’s a pain to manually add oneself to these groups, especially when new sites are being created all the time. This script runs through all the groups on the server following the standard pattern for our website users groups (using regex) and adds the user running the script to these groups. The script displays verbosely what groups are to be added and the user expressly gives permission prior to performing any actions.
Wrote a little snippet at work today for anyone who might need to get a LAMP environment set up fast for a dev environment. Works perfect for me for one off virtual machines I am doing testing in.
So recently I decided to dive back into Keto, the high-fat, adequate-protein, low-carbohydrate diet[note]https://www.reddit.com/r/keto/wiki/faq[/note]. As someone who enjoys bread more than possibly anyone on earth, it’s been very tough but I’ve been serious about keeping to it so far. And I’ve lost over 20 pounds since February.
One interesting aspect of keto is the idea of generating and using suggested guidelines called macros. These are generated monthly by myself with the help of some smarypants websites[note]http://keto-calculator.ankerl.com/[/note] and are intended to guide keto dieters towards the amount of macronutrients needed to maintain weight loss. The typical numbers for keto are fat, protein, and net carbohydrates. A fairly typical part of reading about this stuff online is disagreement over how seriously one should stick to their macros, ranging from barely to religiously. Whether or not I agree/disagree, I appreciate it as a framework and have been using it as a guide for this process. (especially in terms of how many carbs to stick to per day)
This should be a useful snippet for anyone that needs to do a lookup for a WordPress plugin’s latest available version number. I will be using this snippet to create a function in a larger WordPress environment operations script I have been developing for work.