This on r/programming today: CSS Tips. There are a lot of good tricks in there, this one was my fav:
.center {
display: flex;
align-items: center;
justify-content: center;
}
…it centres content vertically and horizontally.
This on r/programming today: CSS Tips. There are a lot of good tricks in there, this one was my fav:
.center {
display: flex;
align-items: center;
justify-content: center;
}
…it centres content vertically and horizontally.
Some good tools and techniques listed over one Tools for Auditing CSS.
This on r/programming today: Font size is useless; let’s fix it. Interesting article, but I didn’t read it closely.
Kickass: Charts.css. Also of interest: Which color scale to use when visualizing data.
I confirmed with the following code that if you call ‘exit’ withing a ‘try’ block the ‘finally’ block does *not* execute. That’s probably what you would expect. But now we know.
register_shutdown_function( 'handle_shutdown' );
try {
exit;
}
catch ( Exception $ex ) {
echo "caught...\n";
}
finally {
echo "finally...\n";
}
function handle_shutdown() {
echo "shutdown...\n";
}
Putting these settings in /etc/php/7.2/apache/php.ini did the job:
[XDebug]
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /tmp/xdebug
xdebug.profiler_output_name = cachegrind.out.%p.%u.%H.%R.xt
The cachegrind files are now written to /tmp/xdebug.
This popped up on lobsters today: Chrome Platform Status: CSS usage. It’s a report on the prevalence of CSS properties as found in the wild. It’s interesting. I was surprised by some things. e.g. ‘display’ and ‘position’ are more prevalent than ‘padding’ and ‘margin’.
This security.txt looks like a good idea.
I just wanted to get something that I’ve thought for many years on record, because I don’t think I’ve ever had the chance to discuss it much before, but I believe JSON web services (“REST APIs”) and web applications should deal only in two HTTP verbs, being: GET and POST. You use GET for queries and you use POST for submissions. All POST operations go through business logic for particular services and CRUDing URLs is a supremely bad idea, in my opinion. Just wanted to get that on record. Thanks. p.s for web applications you should 3xx on success, not 2xx on success; what you do for JSON web services is up to you, but for those 2xx is probably fine.
This looks like a good idea: Introducing State Partitioning.