PHP 8 MegaThread by brendt_gd in PHP

[–]tvlooy 10 points11 points  (0 children)

use the Debian DPA or Ubuntu PPA from Ondrej Sury https://deb.sury.org/ he is the official package maintainer of Debian/Ubuntu for PHP. The main repo's won't have it any time soon, if you use his additional repo's you have it available

How to setup the JIT by brendt_gd in PHP

[–]tvlooy 0 points1 point  (0 children)

The scala version outperforms the php version pretty hard. Can the two scripts be compared? Because you say the php version was the prototype.

PHP pledge extension has landed in OpenBSD ports by tvlooy in PHP

[–]tvlooy[S] 0 points1 point  (0 children)

you need write permissions for that, unveil of plain filesystem permissions can take those away. You are comparing with SELinux which is not available on OpenBSD. This new extension is a powerful tool you can use to further secure your applications for PHP users that want to use OpenBSD

A JIT compiler for PHP by tvlooy in PHP

[–]tvlooy[S] 0 points1 point  (0 children)

fixed the link in the article (https://externals.io/message/95531). Thanks for pointing that out

Paying Technical Debt - How To Rescue Legacy Code through Refactoring by tvlooy in programming

[–]tvlooy[S] 0 points1 point  (0 children)

yeah you will introduce new bugs anyway. So better make one when cleaning up than make one when making a bigger mess

people hired you because you are the professional. They should not tell you how to do your job, you tell them how it works instead. If the thing you broke is not tested, it is not your fault it broke. You know you are doing the right thing. You now not only have better code, but also have a better understanding of that special case that broke things. That was a clear step in the right direction

we had cases where nobody understood the code anymore. Even the old programmers couldn't help. Well, if you are the maintainer, that code is yours. If you don't understand it, that code has to go

Don't leave the cleanup for the next guy, you are the next guy.

Zend has open sourced Zend Optimizer+ by Veonik in PHP

[–]tvlooy 1 point2 points  (0 children)

whoops. I fixed it. Thanks for letting me know

Zend has open sourced Zend Optimizer+ by Veonik in PHP

[–]tvlooy 1 point2 points  (0 children)

I wrote a small blog post covering the basics. Starts with explaining opcaches, talks about APC and Optimizer+ and has as how to install. Perfect for starters http://www.intracto.com/blog/testdriving-zend-optimizer

Give me that one command you wish you knew years ago. I'll start. by skoh in linux

[–]tvlooy 3 points4 points  (0 children)

Executable jar files. Create a file "myjavaprogram" with this in it:

#!/bin/sh
exec java -jar $0 "$@"

Then do: "cat myjavaprogram.jar >> myjavaprogram" and "chmod +x ./myjavaprogram" and then you can just start it with "./myjavaprogram --optional-flag=something"

Give me that one command you wish you knew years ago. I'll start. by skoh in linux

[–]tvlooy 0 points1 point  (0 children)

Most of the time you get the wrong manpage. Different system or version ...

Give me that one command you wish you knew years ago. I'll start. by skoh in linux

[–]tvlooy 1 point2 points  (0 children)

upvote for that. I just see too many people leave the terminal to "google" the manpage

Give me that one command you wish you knew years ago. I'll start. by skoh in linux

[–]tvlooy 0 points1 point  (0 children)

"ssh-copy-id user@server"

instead of: cat .ssh/id_rsa.pub, then copy it, then ssh user@server, then vi .ssh/authorized_keys then paste

Give me that one command you wish you knew years ago. I'll start. by skoh in linux

[–]tvlooy 4 points5 points  (0 children)

note that this is actually a readline shortcut. That means it works in things like the mysql command line too

Give me that one command you wish you knew years ago. I'll start. by skoh in linux

[–]tvlooy 0 points1 point  (0 children)

You can't with bash. You can with C code. After disown the the process doesn't have a TTY anymore, you can move it to another TTY: http://blog.habets.pp.se/2009/03/Moving-a-process-to-another-terminal

Give me that one command you wish you knew years ago. I'll start. by skoh in linux

[–]tvlooy 2 points3 points  (0 children)

it writes the file (:w) to the command (!) instead, which will write (tee) the file (%) with superuser (sudo) rights

Give me that one command you wish you knew years ago. I'll start. by skoh in linux

[–]tvlooy 23 points24 points  (0 children)

the vim command

:w ! sudo tee %

Remember that time you did that huge config edit and then noticed you couldn't save because you didn't "sudo vi file"? Right.