Making Mora Knives

https://theawesomer.com/photos/2021/05/making_mora_knives_t.jpg

Making Mora Knives

Link

We’ve seen how individual blacksmiths and blademakers painstakingly handcraft knives one at a time. This factory footage from Sweden’s Morakniv shows us the opposite – how robots and other machines crank out thousands of knives each day. Humans are still involved in the assembly and quality assurance processes.

The Awesomer

Ford Designs Simple Anti-COVID DIY Air Filtration with Common Box Fan

https://s3files.core77.com/blog/images/1185521_81_108828_LPsS3rIgM.jpg

Now that we know COVID is spread via aerosol rather than fomites, having clean air is of more concern than clean hands. Automaker Ford, working together with fan manufacturer Lasko, is addressing this with their design of a simple air filtration system centered on a common box fan.

The design stemmed from research conducted "using supercomputer air flow analysis to determine if a low-cost box fan air cleaner can mitigate the risk of airborne transmission of COVID-19 in a classroom equipped with a single horizontal unit ventilator."

"The study found that box fan air cleaners like this can serve as an effective low-cost alternative for mitigating airborne transmission risks in poorly ventilated spaces."

Ford and Lasko’s inexpensive fix is simply a cardboard cutout that supports an ordinary air filter (they’re recommending MERV 13 or higher, so it looks like you don’t have to go full HEPA) and attaches to a box fan.

They’re calling it the Scrappy Filtration system, and they’ve donated 20,000 kits to schools in underserved communities.

If you want to make your own, they’ve got a template you can download here.

Core77

A configuration that can double MySQL write performance

https://mysqlonarm.github.io/images/blog21/img1.png

MySQL is heavily tunable and some of the configuration can have significant impact on its performance. During my experiment for numa scalability I encountered one such configuration. Default configuration tends to suggest heavy contention for write workload but once tuned it helps scale MySQL by more than 2x.

Understanding the problem

I started testing write-workloads with different numa levels (1 numa [32 cores]/2 numa [64 cores]/ 4 numa [128 cores]) and observed a weird behavior.

  • With increasing compute power we expected throughput to grow. The pattern is observed when we move from 1 numa to 2 numa but there is significant throughput loss (despite double compute power) when switched from 2 numa to 4 numa.
  • This is exactly what we call as NUMA SCALABILITY BOTTLENECK (vs a SCALABILITY BOTTLENECK that tends to achieve optimal performance with a given set of compute and io resources).

server: mysql-8.0.24.
configuration: click here (+ skip-log-bin)
machine: ARM machine (kunpeng 920 (2 sockets, 128 cores, 4 numa nodes), nvme ssd)
workload: sysbench update-index (cpu-bound)

Identifying the bottleneck

To get more insight on contention I resorted to perf-schema.

+-----------------------------------------------+---------------+------------+
| EVENT_NAME                                    | WAIT_MS       | COUNT_STAR |
+-----------------------------------------------+---------------+------------+
| wait/synch/mutex/innodb/trx_sys_mutex         | 28341923.1285 |    8637971 |
| wait/synch/mutex/innodb/undo_space_rseg_mutex | 24417716.9238 |    3895877 |
| wait/synch/mutex/innodb/sync_array_mutex      |  3619893.6460 |   38717477 |
+-----------------------------------------------+---------------+------------+
3 rows in set (0.05 sec)

Surprisingly the 2nd most contended mutex is rollback segment mutex. (1st being trx_sys that is a known issue and mysql hopefully is working on it to make trx_sys lock-free).

Fortunately, there is a way out.

undo tablespaces

MySQL has been working on improving the undo tablespace framework for quite some time, starting with undo tablespace truncation (and I am fortunate enough to code it back in 5.7x timeframe). I still remember discussing the limitation of the 128 rollback segments but given it would need major change it was deferred to 8.x and eventually it came with 8.x (changes around 8.0.14 and then again 8.0.23) where-in user can now configure extra undo tablespaces and that in turn defines number of rollback segments.

Here is the latest and simplified view:

InnoDB will create 2 default undo tablespaces (also known as implicit tablespaces)
Users can add 125 (maximum) undo tablespaces (also known as explicit tablespaces).
Total: 127 undo tablespaces.

Each undo tablespace can host 128 rollback segments (controlled using innodb_rollback_segments).

So 127 * 128 = 16256 rollback segments are available for transactions.

mysql> show status like '%undo%';
+----------------------------------+-------+
| Variable_name                    | Value |
+----------------------------------+-------+
| Innodb_undo_tablespaces_total    | 127   |
| Innodb_undo_tablespaces_implicit | 2     |
| Innodb_undo_tablespaces_explicit | 125   |
| Innodb_undo_tablespaces_active   | 127   |
+----------------------------------+-------+
4 rows in set (0.00 sec)

(It is just 128 rollback segments in 5.7. Starting 8.x given 2 default undo tablespaces 256 rollback segments are made active by default)

Resolving Contention

So with default 2 undo-tablespaces only 256 rollback segments are made active and N transactions will share these rollback segments. With N = 150K approximately 586 transactions use the same rollback segments creating heavy contention as all of them need the said mutex latch in order to add their undo-logs to transaction history during commit stage (check trx_write_serialisation_history for more details).

If we create additional 125 explicit undo tablespaces it would make 127 * 128 = 16256 rollback segments that is around 9 transactions per rollback segment significantly reducing the contention.

Let’s see if this solution helps.

Same could be confirmed with perf schema output

With 2 undo tablespaces:

+-----------------------------------------------+---------------+------------+
| EVENT_NAME                                    | WAIT_MS       | COUNT_STAR |
+-----------------------------------------------+---------------+------------+
| wait/synch/mutex/innodb/trx_sys_mutex         | 88168453.5988 |   19540096 |
| wait/synch/mutex/innodb/undo_space_rseg_mutex | 78933376.9118 |   14811159 |
| wait/synch/mutex/innodb/sync_array_mutex      | 11274812.8370 |  111143905 |
+-----------------------------------------------+---------------+------------+
3 rows in set (0.04 sec)

With 127 undo tablespaces:

+-------------------------------------------------+----------------+------------+
| EVENT_NAME                                      | WAIT_MS        | COUNT_STAR |
+-------------------------------------------------+----------------+------------+
| wait/synch/mutex/innodb/trx_sys_mutex           | 153155037.4916 |   33537120 |
| wait/synch/mutex/innodb/buf_pool_LRU_list_mutex |  18706130.3456 |   38819242 |
| wait/synch/mutex/innodb/sync_array_mutex        |   4240650.4708 |   93054607 |
+-------------------------------------------------+----------------+------------+
3 rows in set (0.08 sec)

| wait/synch/mutex/innodb/undo_space_rseg_mutex           |    213977.8787 |   31464777 |

Wait has reduced from 78933376 milli-seconds (77 seconds per thread) to 213977 milli-seconds (0.2 seconds per thread).

Fallback (if any?)

Approach of increasing undo tablespace is really good but enabling 125 explicit tablespaces consumes disk space and to keep this in limit users should configure undo tablespace truncate.

Default innodb_max_undo_log_size = 1GB assuming all 127 tablespaces are growing uniformly, truncate will not kick in till all of them are around 1GB in size there-by consuming 127GB of the disk space.

If you plan to enable 127 tablespaces then better is to reduce the innodb_max_undo_log_size (unless disk space is not a concern).

Effect of enabling 127 tablespaces on lesser numa nodes

As we could see there is negligible/marginal effect on enabling 127 tablespaces for lower numa nodes. NUMA scalability fix/solution effects are observed with increased numa nodes but minimal change is observed for lower numa nodes. We can have a separate blog post about NUMA scalability explaining why such effects are observed.

Conclusion

Scaling MySQL for NUMA has its own challenges and while the solution for some of these problems pre-exist extra configuration may be needed. It would be really helpful if MySQL can auto detect and configure some of these limits based on the numa configuration it is running on.

If you have more questions/queries do let me know. Will try to answer them.

Planet MySQL

The Best Bug Repellents

https://cdn.thewirecutter.com/wp-content/uploads/2019/03/bug-repellent-lowres-9664-630×420.jpg

The Best Bug Repellents

Everyone should avoid bug bites. For a bug repellent that’s safe and effective—and that won’t stink or leave a puddle of oil on your skin—skip the DEET and get a picaridin formula, like Sawyer Products Premium Insect Repellent with 20 percent picaridin. It’s the best bottle of bug spray we found after testing 17 repellents and talking to everyone—from the EPA to the American Mosquito Control Association. One fact to establish up front: There’s no evidence that mosquitoes can transmit the coronavirus—but the diseases that biting insects do carry ain’t no picnic either.

Wirecutter: Reviews for the Real World

Laravel 8 Roles and Permissions Without Package

https://www.codecheef.org/user/img/fevicon.png

Laravel 8 Roles and Permissions Without Package

Posted By


Mahedi Hasan

Category

Framework

Sub-category

Laravel 5.6

November 14, 2019

Roles and permissions are an important part of many web applications. In this tutorial we will see how we can implement user roles and permissions system in laravel. We will see it from scratch. We won’t use /laravel-permission package for doing it. But you can use /laravel-permission to create this roles and permissions system in laravel 8.

It is important to add laravel user roles and permissions mechanism in our large scale application to give the permit to user to specific task. We will see from scratch laravel 8 user roles and permissions tutorial. 

If you don’t know how to create laravel 8 roles and permissions, then you are a right place. I will teach you from scratch laravel roles and permissions.But in this tutorial we will do user roles and permissions in laravel using our own custom code. So let’s start how to implement & setup roles and permissions in Laravel.

I updated this tutorial for laravel 8 version. So if you face any error, then you can check git repository. Let’s start laravel 8 user roles and permissions tutorial.

 

Git Repository : User Roles & Access Permission Laravel 

 

roles-permissions-laravel

 

Step 1 : Download Laravel Project

Open up your terminal and create a new Laravel project by typing in the following command

composer create-project --prefer-dist laravel/laravel blog

 

Step 2:  Make Auth

If you are using laravel version 6 then run below command to make auth

composer require laravel/ui --dev
php artisan ui vue --auth
npm install
npm run watch

 

If you are using below laravel version 6 then run below command to make auth

php artisan make:auth

 

Step 3 : Make Model

We need model to make users roles and permissions. So let’s create our model using below command.

php artisan make:model Permission -m
php artisan make:model Role -m

 

As you may know, -m flag will create a migration file for the model. Now you’ll have two new migration files waiting for you to add new fields. 

 

Step 4 : Edit the migration file

 

public function up()
    {
       Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email',191)->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
    });
}

 

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePermissionsTable extends Migration
{
    
    public function up()
    {
        Schema::create('permissions', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name'); // edit posts
            $table->string('slug'); //edit-posts
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('permissions');
    }
}

 

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRolesTable extends Migration
{
    public function up()
    {
        Schema::create('roles', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name'); // edit posts
            $table->string('slug'); //edit-posts
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('roles');
    }
}

 

Step 5 : Adding pivot tables

For this first pivot table, we’ll create a new migration file for the table users_permissions. So run below command to create

php artisan make:migration create_users_permissions_table --create=users_permissions

 

For this pivot table between users and permissions, our schema should look like

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUsersPermissionsTable extends Migration
{
    public function up()
    {
        Schema::create('users_permissions', function (Blueprint $table) {
            $table->unsignedInteger('user_id');
            $table->unsignedInteger('permission_id');

            //FOREIGN KEY CONSTRAINTS
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
            $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade');
 
            //SETTING THE PRIMARY KEYS
            $table->primary(['user_id','permission_id']);
        });
    }

    public function down()
    {
        Schema::dropIfExists('users_permissions');
    }
}

 

Now let’s create a pivot table for users_roles.

php artisan make:migration create_users_roles_table --create=users_roles

 

The fields inside this table will pretty much the same as in users_permissions table. Our schema for this table will look like:

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUsersRolesTable extends Migration
{
    public function up()
    {
        Schema::create('users_roles', function (Blueprint $table) {
            $table->unsignedInteger('user_id');
            $table->unsignedInteger('role_id');

         //FOREIGN KEY CONSTRAINTS
           $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
           $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');

         //SETTING THE PRIMARY KEYS
           $table->primary(['user_id','role_id']);
        });
    }

    public function down()
    {
        Schema::dropIfExists('users_roles');
    }
}

 

Under a particular Role, User may have specific Permission

For example, a user may have the permission for post a topic, and an admin may have the permission to edit or delete a topic. In this case, let’s setup a new table for roles_permissions to handle this complexity.

 

php artisan make:migration create_roles_permissions_table --create=roles_permissions

 

The Schema will be like:

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRolesPermissionsTable extends Migration
{
    public function up()
    {
        Schema::create('roles_permissions', function (Blueprint $table) {
             $table->unsignedInteger('role_id');
             $table->unsignedInteger('permission_id');

             //FOREIGN KEY CONSTRAINTS
             $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
             $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade');

             //SETTING THE PRIMARY KEYS
             $table->primary(['role_id','permission_id']);
        });
    }

    public function down()
    {
        Schema::dropIfExists('roles_permissions');
    }
}

 

Now run following command to create migration

php artisan migrate

 

Step 6 : Setting up the relationships

We’ll start by creating the relationships between roles and permissions table. In our Role.php , Permision.php.

App/Role.php

public function permissions() {

   return $this->belongsToMany(Permission::class,'roles_permissions');
       
}

public function users() {

   return $this->belongsToMany(User::class,'users_roles');
       
}

 

App/Permission.php

public function roles() {

   return $this->belongsToMany(Role::class,'roles_permissions');
       
}

public function users() {

   return $this->belongsToMany(User::class,'users_permissions');
       
}

 

Step 7 : Creating a Trait

Inside of our app directory, let’s create a new directory and name it as Permissions and create a new file namely HasPermissionsTrait.php. A nice little trait has been setup to handle user relations. Back in our User model, just import this trait and we’re good to go.

app/User.php

namespace App;

use App\Permissions\HasPermissionsTrait;

class User extends Authenticatable
{
    use HasPermissionsTrait; //Import The Trait
}

 

Now open HasPermissionsTrait.php and paste those following code.

App/Permissions/HasPermissionsTrait.php

namespace App\Permissions;

use App\Permission;
use App\Role;

trait HasPermissionsTrait {

   public function givePermissionsTo(... $permissions) {

    $permissions = $this->getAllPermissions($permissions);
    dd($permissions);
    if($permissions === null) {
      return $this;
    }
    $this->permissions()->saveMany($permissions);
    return $this;
  }

  public function withdrawPermissionsTo( ... $permissions ) {

    $permissions = $this->getAllPermissions($permissions);
    $this->permissions()->detach($permissions);
    return $this;

  }

  public function refreshPermissions( ... $permissions ) {

    $this->permissions()->detach();
    return $this->givePermissionsTo($permissions);
  }

  public function hasPermissionTo($permission) {

    return $this->hasPermissionThroughRole($permission) || $this->hasPermission($permission);
  }

  public function hasPermissionThroughRole($permission) {

    foreach ($permission->roles as $role){
      if($this->roles->contains($role)) {
        return true;
      }
    }
    return false;
  }

  public function hasRole( ... $roles ) {

    foreach ($roles as $role) {
      if ($this->roles->contains('slug', $role)) {
        return true;
      }
    }
    return false;
  }

  public function roles() {

    return $this->belongsToMany(Role::class,'users_roles');

  }
  public function permissions() {

    return $this->belongsToMany(Permission::class,'users_permissions');

  }
  protected function hasPermission($permission) {

    return (bool) $this->permissions->where('slug', $permission->slug)->count();
  }

  protected function getAllPermissions(array $permissions) {

    return Permission::whereIn('slug',$permissions)->get();
    
  }

}

 

Here, we’re iterating through the roles and checking by the slug field, if that specific role exists. You can check or debug this by using:

$user = $request->user(); //getting the current logged in user
dd($user->hasRole('admin','editor')); // and so on

 

Step 8 :  Create CustomProvider

We’ll be utilizing the Laravel’s “can” directive to check if the User have Permission. and instead of using $user->hasPermissionTo().

we’ll use $user->can() To do so, we need to create a new PermissionsServiceProvider for authorization

php artisan make:provider PermissionsServiceProvider

 

Register your service provider and head over to the boot method to provide us a Gateway to use can() method.

namespace App\Providers;

use App\Permission;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;

class PermissionsServiceProvider extends ServiceProvider
{
   
    public function register()
    {
        //
    }

    public function boot()
    {
        try {
            Permission::get()->map(function ($permission) {
                Gate::define($permission->slug, function ($user) use ($permission) {
                    return $user->hasPermissionTo($permission);
                });
            });
        } catch (\Exception $e) {
            report($e);
            return false;
        }

        //Blade directives
        Blade::directive('role', function ($role) {
             return "if(auth()->check() && auth()->user()->hasRole({$role})) :"; //return this if statement inside php tag
        });

        Blade::directive('endrole', function ($role) {
             return "endif;"; //return this endif statement inside php tag
        });

    }
}

 

now we have to register our PermissionsServiceProvider. Open this following file add this in providers array.

config\app.php

 'providers' => [

        App\Providers\PermissionsServiceProvider::class,
    
 ],

 

You can learn more about Laravel’s Gate facade at Laravel’s documentation. You can test it out as:

dd($user->can('permission-slug'));

 

Read also :  Laravel 6 Authorization using Gates

 

Step 9 : Add Dummy Data To Check

For creating roles and permissions tutorial, we need dummy data to check our user access. To create it paste this following code into this followng slug.

Route::get('/roles', 'PermissionController@Permission');

 

App\Http\Controllers\PermissionController.php

namespace App\Http\Controllers;

use App\Permission;
use App\Role;
use App\User;
use Illuminate\Http\Request;

class PermissionController extends Controller
{   

    public function Permission()
    {   
    	$dev_permission = Permission::where('slug','create-tasks')->first();
		$manager_permission = Permission::where('slug', 'edit-users')->first();

		//RoleTableSeeder.php
		$dev_role = new Role();
		$dev_role->slug = 'developer';
		$dev_role->name = 'Front-end Developer';
		$dev_role->save();
		$dev_role->permissions()->attach($dev_permission);

		$manager_role = new Role();
		$manager_role->slug = 'manager';
		$manager_role->name = 'Assistant Manager';
		$manager_role->save();
		$manager_role->permissions()->attach($manager_permission);

		$dev_role = Role::where('slug','developer')->first();
		$manager_role = Role::where('slug', 'manager')->first();

		$createTasks = new Permission();
		$createTasks->slug = 'create-tasks';
		$createTasks->name = 'Create Tasks';
		$createTasks->save();
		$createTasks->roles()->attach($dev_role);

		$editUsers = new Permission();
		$editUsers->slug = 'edit-users';
		$editUsers->name = 'Edit Users';
		$editUsers->save();
		$editUsers->roles()->attach($manager_role);

		$dev_role = Role::where('slug','developer')->first();
		$manager_role = Role::where('slug', 'manager')->first();
		$dev_perm = Permission::where('slug','create-tasks')->first();
		$manager_perm = Permission::where('slug','edit-users')->first();

		$developer = new User();
		$developer->name = 'Mahedi Hasan';
		$developer->email = 'mahedi@gmail.com';
		$developer->password = bcrypt('secrettt');
		$developer->save();
		$developer->roles()->attach($dev_role);
		$developer->permissions()->attach($dev_perm);

		$manager = new User();
		$manager->name = 'Hafizul Islam';
		$manager->email = 'hafiz@gmail.com';
		$manager->password = bcrypt('secrettt');
		$manager->save();
		$manager->roles()->attach($manager_role);
		$manager->permissions()->attach($manager_perm);

		
		return redirect()->back();
    }
}

 

Now goto this url and hit enter on your keyboard. Then you will see some dummy data to those following tables. To test this out in your routes files, we can die and dump on:

$user = $request->user();
dd($user->hasRole('developer')); //will return true, if user has role
dd($user->givePermissionsTo('create-tasks'));// will return permission, if not null
dd($user->can('create-tasks')); // will return true, if user has permission

 

Inside of our view files, we can use it like:

@role('developer')

 Hello developer

@endrole

 

This means only those user can see it whose role are developer. Now you can use many role as you want.

 

Step 10 : Setup the Middleware

 

Read also : How to Create Middleware with Parameters in Laravel 6

 

In order to protect our routes, we can setup the middleware to do so.

php artisan make:middleware RoleMiddleware

 

Add the middleware into your kernel & setup the handle method as follows

App\Http\Middleware\RoleMiddleware.php

namespace App\Http\Middleware;

use Closure;

class RoleMiddleware
{

    public function handle($request, Closure $next, $role, $permission = null)
    {
        if(!$request->user()->hasRole($role)) {

             abort(404);

        }

        if($permission !== null && !$request->user()->can($permission)) {

              abort(404);
        }

        return $next($request);

    }
}

 

Now we have to register this RoleMiddleware. So add this following code to register it.

App\Http\Kernel.php

protected $routeMiddleware = [
    .
    .
    'role' => \App\Http\Middleware\RoleMiddleware::class,
];

 

Right now in our routes, we can do something like this

Route::group(['middleware' => 'role:developer'], function() {

   Route::get('/admin', function() {

      return 'Welcome Admin';
      
   });

});

 

Now you can use your controller like below to give user permission and access.

public function __construct()
{
   $this->middleware('auth'); 
}


public function store(Request $request)
{
    if ($request->user()->can('create-tasks')) {
        //Code goes here
    }
}

public function destroy(Request $request, $id)
{   
    if ($request->user()->can('delete-tasks')) {
      //Code goes here
    }

}

 

Read also : Understanding Constructor and Method Dependency Injection in Laravel

 

Now only those user can access this route whose role is developer. Hope you will understand total procedure. Hope it will help you.

 

Laravel News Links

Snake Eyes’ First Trailer Gives a G.I. Joe Legend a New Beginning

https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_675,pg_1,q_80,w_1200/ec1af9416e1223be47bac498723dc5b8.jpg

Henry Golding as Snake Eyes in Snake Eyes: G.I. Joe Origins.
Photo: Paramount

Trailer FrenzyA special place to find the newest trailers for movies and TV shows you’re craving.

When you think of Snake Eyes you think of the mask, the swords, the unstoppable ferocity. But how did the popular G.I. Joe character become that guy we’ve seen in comics, cartoons, and toy aisles for decades? We’re about to find out, in a whole new way. The first trailer for Snake Eyes: G.I. Joe Origins is finally here.

The film stars Henry Golding as the titular character, seen here years before he meets up with the Joe crew. Directed by Robert Schwentke, Snake Eyes follows the character as he becomes indoctrinated into the Arashikage clan, learning the ways of the ninja alongside Storm Shadow (Andrew Koji), the group’s heir apparent, and eventually popular Joe characters like The Baroness (Úrsula Corberó), and Scarlett (Samara Weaving) show up too. But this is the Snake Eyes show and, in the first trailer, you get just a taste of what the film has in store.

The film is meant to kick off a whole new G.I. Joe franchise and if you’re curious to know more, check back soon—io9 spoke to Henry Golding all about it. Snake Eyes: G.I. Joe Origins hits theaters on July 23.


For more, make sure you’re following us on our Instagram @io9dotcom.

G/O Media may get a commission

Gizmodo

They really are the enemy of the poeple

https://gunfreezone.net/wp-content/uploads/2016/01/cropped-gfz-ico.png

Tell me why the AP was in a building that Hamas was using to store weapons.

Oh yeah, because the AP were acting as human shields for Hamas, assuming that Israel wouldn’t strike their offices while Hamas hid rockets in the basement.

Everything the Left criticizes people for is projection.

They accuse Israel of war crimes because they were using media offices to protect terrorist weapons caches.

Hitman’s Wife’s Bodyguard (Trailer)

https://theawesomer.com/photos/2021/05/hitmans_wifes_bodyguard_t.jpg

Hitman’s Wife’s Bodyguard (Trailer)

Link

Ryan Reynolds, Samuel L. Jackson, Salma Hayek, Antonio Banderas, and Morgan Freeman star in this action-comedy about a bodyguard who attempts to get out of the business and gets pulled back in to protect the wife of an unhinged killer. It looks like just the kind of madcap Summer romp we could use. In theaters 6.16.2021.

The Awesomer

Friday Funnies

https://gunfreezone.net/wp-content/uploads/2021/05/lock-downs-no-emotional-harm-the-shinning.jpg

 

 

 

 

 

 

Cheap, Highly Efficient New EV Motor Uses No Magnets

"An EV motor has been developed that uses no magnets, thus lessening the United States’ reliance on Chinese magnets (which make up 97% of the world’s supply)," writes Slashdot reader nickwinlund77, adding: "I wonder what the motor’s performance is like on high grade roads?" New Atlas reports: German company Mahle has just announced a new electric motor that sounds like it solves a lot of problems in a very tidy manner. The new Mahle design uses no magnets, instead using powered coils in its rotor. Unlike previous efforts, it transfers power to the spinning rotor using contactless induction — so there are basically no wear surfaces. This should make it extremely durable — not that electric motors have a reputation for needing much maintenance. The lack of expensive metals should make it cheaper to manufacture than typical permanent-magnet motors. Mahle says the ability to tune and change the parameters of the rotor’s magnetism instead of being stuck with what a permanent magnet offers has allowed its engineers to achieve efficiencies above 95 percent right through the range of operating speeds — "a level that has only been achieved by Formula E racing cars." It’s also particularly efficient at high speeds, so it could help squeeze a few extra miles out of a battery in normal use. The company says it’ll scale nicely from sizes relevant to compact cars up to commercial vehicles.
"Our magnet-free motor can certainly be described as a breakthrough, because it provides several advantages that have not yet been combined in a product of this type," says Dr. Martin Berger, Mahle’s VP of Corporate Research and Advanced Engineering. "As a result, we can offer our customers a product with outstanding efficiency at a comparatively low cost." Mass production is about two and a half years away, according to IEEE Spectrum, and Mahle has not yet nominated which auto manufacturers it’s dealing with, but test samples are already starting to circulate.


Read more of this story at Slashdot.

Slashdot