This is side-document providing details for some highlighted changes in 2.5.0. For a full list of changes, see the full release note.
const { log } = console; | |
const Undefined = new Proxy(function() {}, { | |
get(target, key, receiver) { | |
if (key === 'name') { | |
return 'Undefined'; | |
} | |
return Undefined; | |
}, |
#!/bin/bash | |
# | |
# Task wrapper. Runs various chores in a cross platform manner. | |
# | |
# Usage: run [-h] <command> | |
# | |
# Available commands are: | |
# build: Build the project | |
# <other>: Run any other command available in the NPM path | |
# |
Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.
My 3 developers team has just developed React.js application with 7668
lines of CSS (and just 2 !important
).
During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.
Here are main principles we use to write CSS for modern (IE11+) browsers:
- SUIT CSS naming conventions + SUIT CSS design principles;
- PostCSS + CSSNext. Future CSS syntax like variables, nesting, and autoprefixer are good enough;
- Flexbox is awesome. No need for grid framework;
- Normalize.css, base styles and variables are solid foundation for all components;
Building realtime applications is hard.
A scalable solution to this problem involves many cumbersome steps:
- Hooking into replication logs of the database servers, or writing custom data invalidating logic for realtime UI components.
- Adding messaging infrastructure (e.g. RabbitMQ) to your project.
- Writing sophisticated routing logic to avoid broadcasting every message to every web server.
- Reimplementing database functionality in the backend if your app requires realtime computation (e.g. realtime leaderboards).
All this requires enormous commitment of time and engineering resources.
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.
This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async
+ await
.
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
The following attack will display a "you've been signed out" page for GMail, and attempt to steal your account credentials.
DO NOT PUT ANY ACCOUNT CREDENTIALS INTO ANY TABS CREATED AFTER VISITING THESE LINKS :)
I received an email in my GMail inbox with a fake attachment image, styled to look like the real GMail attachment UI:
This linked to a page that ended up displaying a fake "you've been signed out" link, via the data:text/html...
URL feature of Chrome:
<?php | |
Route::group([ | |
'prefix' => 'api/v1', | |
'middleware' => ['api', 'auth:api'] | |
], function () { | |
Route::get('/', function () { | |
return Auth::guard('api')->user(); | |
}); |