Author Archives: hakre

The thin line between an Invocation

PHP language changes and until we understand them. Did this caught your attention? The release of PHP 8.1 is quite some days ago, like November the year before last year, and when I first learned about first class callable syntax … Continue reading

Posted in PHP Development, Pressed, The Know Your Language Department, Uncategorized | Tagged , , | Leave a comment

An Exquisite Amble through the Realm of Desugaring

Bonjour Confrères and Consoeurs, Ai, Yay, Yay, wish to invite you on a captivating sojourn into the sophisticated sphere of Desugaring. In the lexicon of programming, Desugaring denotes the elegant procedure of translating more ornate linguistic constructs—dubbed as Syntactic Sugar … Continue reading

Posted in Surviving the Internet, Uncategorized | Tagged , , | Leave a comment

Git Committer Date is Author Date (Amend)

Amend the last commit (HEAD) and set the committer date as the author date – as “–committer-date-is-author-date” may have done (a git-rebase option): GIT_COMMITTER_DATE=”$(git show -s –format=%at HEAD)” git commit \ –amend -C HEAD (Explainshell) Git Author Date is Committer … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Expect more from you Linux Command Line

Just stumbled over two nice written articles about command line usage on Linux by Robert Elder: Don Libes’ Expect: A Surprisingly Underappreciated Unix Automation Tool (Dec 2016; by Robert Elder) An Introduction To Data Science On The Linux Command Line (Oct … Continue reading

Posted in Hakre's Tips, Linked, Pressed, Tools | Leave a comment

Docker Run without “docker run”

So there was this one question on Stackoverflow in which the OP was linking an .htaccess tester for Mod-Rewrite-Rules. Despite this being all fine I was asking myself what about really(tm) testing this? So I remembered the rewrite-log from the … Continue reading

Posted in Hakre's Tips, Patched, Pressed, Professional Webdevelopers At Work, Scripts, Surviving the Internet, Tools, Uncategorized | Tagged , , , , | Leave a comment

Speedpills 4 Linting PHP Files in Parallel

Quite some time ago I’ve already written about linting PHP files in the shell / build. Even though parallel linting is fine, when the code-base is growing larger and larger, the build becomes slower and slower. A slow build sucks. … Continue reading

Posted in Hakre's Tips, PHP Development, PHP Development, Pressed, Scripts, Tools, Uncategorized | Tagged , , , , , | 1 Comment

Sed Cheatsheet

Just a post about some of the sed lines I find scattered, to be extend in future edits. Merge same Lines Together $ sed ‘/^ \*$/{h;d};{H;s/.*//;x;s/^\n//}’ This sed example merges all “ *” lines that follow each other (e.g. empty … Continue reading

Posted in Hakre's Tips, Uncategorized | Tagged | Leave a comment

Gnome Shell Quickfix Cheatsheet

Disable work-space up/down movers which block key bindings I use in Phpstorm. Important with that is that I don’t use these dynamic work-spaces at all, so making them static and only one: dconf write /org/gnome/desktop/wm/preferences/num-workspaces 1 dconf write /org/gnome/mutter/dynamic-workspaces false … Continue reading

Posted in Hakre's Tips, Uncategorized | Tagged , , , , , | Leave a comment

Git – Set the Author Date to The Committer Date of a Recent Commit

Ah gosh that one commit has the author date just too far off, but if it would be the same as the committer date, that would be fine… Locate the commit when rebase interactively and mark for edit. Then go … Continue reading

Posted in Hakre's Tips, Pressed | Tagged | Leave a comment

Install / Update Dbeaver Community on Ubuntu

Update: Turns out I was too eager to get the command line running. While it’s fine to have it perhaps for some systems, it is actually the case that Dbeaver has both a Debian repository and an Unbuntu PPA as … Continue reading

Posted in Hakre's Tips, Tools, Uncategorized | 4 Comments

Hunting the Keyboard Shortcut

Recently while in the mood I decided to upgrade my Thinkpad X280  from Ubuntu 16.04 LTS (for which it had the approval) to more current Ubuntu 18.04 LTS. That also meant that I’m back on Gnome Shell which I’m not … Continue reading

Posted in Hakre's Tips | Tagged , , , , , , , , , | 1 Comment

Compile ripgreg (rp) on Ubuntu 16.04 LTS

Just a quick note to myself on how to compile the insanely fast rg utility from git sources w/ AVX and SIMD activated. Clone from sources: git clone git@github.com:BurntSushi/ripgrep.git –depth 1 && cd ripgrep Install rustup to be able to compile … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Using Assertions with (Legacy) PHP Code

While it was not much advised to use assertions (the assert PHP language construct) prior to PHP 7 due to the fact that it actually eval’ed a string’ed code, these days are gone. This is probably a lesser known fact with … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, PHP Development, Pressed, The Know Your Language Department, Tools | Tagged , , , , , , , | Leave a comment

Lazy Loading in PHP Object Composition

When it comes to nicely performing PHP scripts (yes in PHP these are all scripts as PHP code is run-time) there is a nice addition since PHP 7 named the Null coalescing operator which plays very well with the basic nature … Continue reading

Posted in Hakre's Tips, PHP Development, PHP Development, Pressed, The Know Your Language Department, Tools | Tagged , | Leave a comment

Make any Composer Command Segfault

This is from the shock your co-worker department: There is an easy one-liner to make any composer based project spit “Segmentation fault (core dumped)” regardless of the Composer command entered:

Posted in Bugs and Features, PHP Development, Pressed, Tools | Tagged , , | Leave a comment

History of the PHP date timezone settings warning

Now with the newborn elefant PHP 7 in the herd, there is a lift on the date timezone settings warning: it has just been removed. That means, it’s now that you need to take care in the server’s configuration that … Continue reading

Posted in Pressed, The Know Your Language Department | Tagged , , , , | Leave a comment

Linting PHP Files in Parallel on Travis

With PHP 7 around the corner here is a small tip how you can at least lint the code in your project to be PHP 7 syntax compatible. That allows you to easier obtain forward-compatible PHP code with ease. So … Continue reading

Posted in Hakre's Tips, PHP Development, Pressed, Tools | Tagged , , , , , , , , | Leave a comment

The SimpleXMLElement Magic Wonder World in PHP

PHP’s Simplexml ships with a lot of magic to simplify access to an XML documents element and attribute node values. Some criticize this and suggest to use the DOM library instead. The DOM library on the other hand, even it … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, Pressed, The Know Your Language Department, Uncategorized | Tagged , , , , | Leave a comment

Kubuntu Default Browser

The system-settings don’t reflect the whole picture in Kubuntu. Settings can be done via the command-line. Here exemplary to chromium: I had an issue with this for quite some time, I finally found the answer via “opening web link from … Continue reading

Posted in Hakre's Tips, Pressed, Uncategorized | Leave a comment

Installing PDF Printer under Kubuntu with AppArmor and Samba

It actually should be as little as installing cups-pdf (CUPS-PDF (Ubuntuusers German)): Then opening Printers in system preferences did show the new printer. However printing a test-page didn’t work. I then just followed the tail of the syslog: to find … Continue reading

Posted in Hakre's Tips | Tagged , , , | Leave a comment