What you need to know about security keys on iOS and macOS

What you need to know about security keys on iOS and macOS

https://ift.tt/2TgIOcl

Article Image

A physical security key, like a YubiKey, is an excellent way to bolster your two-factor authentication and help keep your online accounts and data safe from attackers. Here’s what you need to know about using them on iOS and macOS.

macintosh

via AppleInsider https://ift.tt/2GoRBB2

March 2, 2020 at 02:12PM

What makes for a good CEO?

What makes for a good CEO?

https://ift.tt/2PE8aia

We develop a new method to measure CEO behavior in large samples via a survey that collects high-frequency, high-dimensional diary data and a machine learning algorithm that estimates behavioral types. Applying this method to 1,114 CEOs in six countries reveals two types: “leaders,” who do multifunction, high-level meetings, and “managers,” who do individual meetings with core functions. Firms that hire leaders perform better, and it takes three years for a new CEO to make a difference. Structural estimates indicate that productivity differentials are due to mismatches rather than to leaders being better for all firms.

That is from a new paper by Oriana Bandiera, Andrea Prat, Stephen Hansen, and Raffaella Sadun, forthcoming in the JPE.

The post What makes for a good CEO? appeared first on Marginal REVOLUTION.

thinkers

via Marginal Revolution https://ift.tt/oJndhY

March 2, 2020 at 02:30PM

The Internet Archive’s VHS Vault Is a 1990s Pop Culture Goldmine

The Internet Archive’s VHS Vault Is a 1990s Pop Culture Goldmine

https://ift.tt/2TuZXOD

If you’re someone who has lost hours, if not days, watching old TV clips from your childhood on YouTube, block off some time in your calendar, because you’re about to lose another chunk of your adult life. The Internet Archive—aka the Wayback Machine—now has more than 20,000 VHS recordings available to view for free on its website.

Though the VHS Vault has been around for a while, it has had a lot of recent additions thanks to an organization called Vista Group, which has been uploading hundreds of new videos since the start of 2020, VICE reported.

So what kind of gems will you find in the VHS Vault? The clips, shows and films run the gamut from instructional videos, to documentaries, to children’s programs, to workout videos. Want to watch the 1935 film version of Les Misérables? It’s on there. Want to work out with Traci Lords? Your wish is the VHS Vault’s command. Want to watch every single episode of Salute Your Shorts? Get ready to spend some quality time with Budnick, Dina and Ug Lee. How about an introduction to Windows 95 with Jennifer Aniston and Matthew Perry? Yes, that exists, and it’s on there, too.

New videos are being added every day, so even if you work your way through everything you think you want to watch, there are more on their way. And though it’s not the most user-friendly site in the world, it’s relatively easy to search for videos via keywords either in the metadata or the text contents. You can also narrow it down by who uploaded the video, which year it was uploaded, the language, and topics and subjects (like PBS, commercials, Nickelodeon and puppet).

So if you end up having to hole up at home because you’re not feeling well, you could do worse than spending a few hours making your way through these videos. Better yet, you won’t even have to rewind them.

geeky,Tech,Database

via Lifehacker https://lifehacker.com

March 2, 2020 at 12:15PM

Laravel Scavenger

Laravel Scavenger

https://ift.tt/3deeHKO

The most integrated web scraper package for Laravel.

Scavenger provides the following features and more out-the-box.

Scavenger is highly configurable. These configurations remain for use the next time around.

Below is an example of a typical config file structure, with explaining comments.

<?php  return [  // debug mode?  'debug' => false,   // whether log file should be written  'log' => true,   // How much detail is expected in output, 1 being the lowest, 3 being highest.  'verbosity' => 1,   // Set the database config  'database' => [  // Scraps table  'scraps_table' => env('SCAVENGER_SCRAPS_TABLE', 'scavenger_scraps'),  ],   // Daemon config - used to build daemon user  'daemon' => [  // Model to use for Daemon identification and login  'model' => 'App\\User',   // Model property to check for daemon ID  'id_prop' => 'email',   // Daemon ID  'id' => 'daemon@scavenger.reliqarts.com',   // Any additional information required to create a user:  // NB. this is only used when creating a daemon user, there is no "safe" way  // to change the daemon's password once he has been created.  'info' => [  'name' => 'Scavenger Daemon',  'password' => 'pass',  ],  ],   // guzzle settings  'guzzle_settings' => [  'timeout' => 60,  ],   // hashing algorithm to use  'hash_algorithm' => 'sha512',   // storage  'storage' => [  // This directory will live inside your application's log directory.  'log_dir' => env('SCAVENGER_LOG_DIR', 'scavenger'),  ],   // different model entities and mapping information  'targets' => [  // NB. the "rooms" target shown below is for example purposes only. It has all posible keys explicitly.  'rooms' => [  'example' => true,  'serp' => false,  'model' => 'App\\Room',  'source' => 'http://myroomslistingsite.1demo/section/rooms',  'search' => [  // keywords  'keywords' => ['professional'],  // form markup  'form' => [  // search form selector (important)  'selector' => '#form',  // input element name for search term/keyword  'keyword_input_name' => 'keyword',  'submit_button' => [  // text on submit button (optional)  'text' => null,  // submit element id, use if button doesn't have text (optional)  'id' => null,  ],  ],  ],  'pager' => [  // link (a tag) selector  'selector' => 'div.content #page a.pagingnav',  ],  // max. number of pages to scrape (0 is unlimited)  'pages' => 0,  // content markup: actual data to be scraped  'markup' => [  'title' => 'div.content section > table tr h3',  // inside: content to be found upon clicking title link  '__inside' => [  'title' => '#ad-title > h1 > a',  'body' => 'article .adcontent > p[align="LEFT"]:last-of-type',  // focus: focus detail on the following section  '__focus' => 'section section > .content #ad-detail > article',  ],  // wrapper/item/result: wrapping selector for each item on single page.  // If inside special key is set this key becomes invalid (i.e. inside takes preference)  '__result' => null,  ],  // split single attributes into multiple based on regex  'dissect' => [  'body' => [  'email' => '(([eE]mail)*:*\s*\w+\@(\s*\w)*\.(net|com))',  'phone' => '((([cC]all|[[tT]el|[Pp][Hh](one)*)[:\d\-,\sDL\/]*\d)|(\d{3}\-?\d{4}))',  'beds' => '([\d]+[\d\.\/\s]*[^\w]*([Bb]edroom|b\/r|[Bb]ed)s?)',  'baths' => '([\d]+[\d\.\/\s]*[^\w]*([Bb]athroom|bth|[Bb]ath)s?)',  // retain: whether details should be left in source attribute after extraction  '__retain' => true,  ],  ],  // modify attributes by calling functions  'preprocess' => [  // takes a callable  // optional third parameter of array if callable method needs an instance  // e.g. ['App\\Item', 'foo', true] or 'bar'  'title' => null,  ],  // remap entity attributes to model properties (optional)  'remap' => [  'title' => null,  'body' => null,  ],  // scraps containing any of these words will be rejected (optional)  'bad_words' => [  'office',  ],  ],   // Google SERP example:  'google' => [  'example' => true,  'serp' => true,  'model' => 'App\\GoogleResult',  'source' => 'https://www.google.com',  'search' => [  'keywords' => ['dog'],  'form' => [  'selector' => 'form[name="f"]',  'keyword_input_name' => 'q',  ],  ],  'pages' => 2,  'pager' => [  'selector' => '#foot > table > tr > td.b:last-child a',  ],  'markup' => [  '__result' => 'div.g',  'title' => 'h3 > a',  'description' => '.st',  // the 'link' and 'position' attributes make use of some of Scavengers available properties  'link' => '__link',  'position' => '__position',  ],  ],   // Bing SERP example:  'bing' => [  'example' => true,  'serp' => true,  'model' => 'App\\BingResult',  'source' => 'https://www.bing.com',  'search' => [  'keywords' => ['dog'],  'form' => [  'selector' => 'form#sb_form',  'keyword_input_name' => 'q',  ],  ],  'pages' => 3,  'pager' => [  'selector' => '.sb_pagN',  ],  'markup' => [  '__result' => '.b_algo',  'title' => 'h2 a',  'description' => '.b_caption p',  'link' => '__link',  'position' => '__position',  ],  ],  ], ]; 

The following words may appear in context above.

programming

via Laravel News Links https://ift.tt/2dvygAJ

March 2, 2020 at 09:25AM

Cabela’s Make the 2nd Amendment a Priority Promotion

Cabela’s Make the 2nd Amendment a Priority Promotion

https://ift.tt/2IPHiYN

Cabela's Make the 2nd Amendment a Priority Promotion
Cabela’s Make the 2nd Amendment a Priority Promotion

USA –  -(AmmoLand.com)- Cabela’s is having a make the 2nd Amendment a Priority Promotion through March 11th, 2020. When you spend $50.00 you can get $10.00 off, spend $100 or more and get $10.00 off and a free Grunt Life T-Shirt!

Cabela’s Make the 2nd Amendment a Priority Promotion


About Bass Pro Shops/Cabela’s

CabelasBass Pro Shops is North America’s premier outdoor and conservation company. Founded in 1972 when avid young angler Johnny Morris began selling tackle out of his father’s liquor store in Springfield, Missouri, today the company provides customers with unmatched offerings spanning premier destination retail, outdoor equipment manufacturing, world-class resort destinations and more. In 2017 Bass Pro Shops acquired Cabela’s to create a “best-of-the-best” experience with superior products, dynamic locations, and outstanding customer service. Bass Pro Shops also operates White River Marine Group, offering an unsurpassed collection of industry-leading boat brands, and Big Cedar Lodge, America’s Premier Wilderness Resort. Under the visionary conservation leadership of Johnny Morris, Bass Pro Shops is a national leader in protecting habitat and introducing families to the outdoors and has been named by Forbes as “one of America’s Best Employers.”

The post Cabela’s Make the 2nd Amendment a Priority Promotion appeared first on AmmoLand.com.

guns

via AmmoLand.com https://ift.tt/2okaFKE

February 28, 2020 at 04:09PM

Tinkerwell Snippets

Tinkerwell Snippets

https://ift.tt/2wXK1N8

Get Tinkerwell

Please not that you need a valid Tinkerwell-License which you can get from the official Tinkerwell-Website.

Get Tinkerwell (This website is a community-project and is NOT affiliated with Tinkerwell at all)

programming

via Laravel News Links https://ift.tt/2dvygAJ

February 28, 2020 at 09:22AM

Balloon Mayhem

Balloon Mayhem

https://ift.tt/2TsrIXQ

Balloon Mayhem

Link

Perhaps it’s some deep-seated childhood disappointment, but there’s something about the sound of balloons popping that sets us on edge. But that’s all you’re gonna get in this video from performance artist Jan Hakon Erichsen, as he uses a variety of knife rigs to shamelessly destroy a bunch of the party inflatables.

fun

via The Awesomer https://theawesomer.com

February 28, 2020 at 09:30AM

Laravel Livewire CRUD tutorial

Laravel Livewire CRUD tutorial

https://ift.tt/3d6a4Cb

Laravel Livewire is a frontend framework package for Laravel Framework. With the help of Laravel Livewire, you can run php code like JavaScript! It’s really an interesting and magical frontend framework package for Laravel. If you are looking for a step by step CRUD (Create, Read, Update, Delete) tutorial on Laravel livewire then this is the post where I’ll show you a complete step by step Laravel Livewire CRUD operation. If you are very new to Laravel Livewire, I’ll recommend you to read about Larave Livewire post. At the end of this tutorial, we’ll archive this kind of functionality where we can insert, edit, delete record from a single view (SPA) with the help of Larave Livewire without any page refresh.

laravel-livewire-crud.png

Table of Contents

  • Define a route
  • Make a view for CRUD operation
  • Make a model
  • Install Laravel Livewire
  • Setup the layout file
  • Create a Laravel Livewire component php class
  • Create Laravel Livewire component views
  • Conclusion

 

Define a route

Define a route into route file for returning a view for our CRUD operation. Here we’ll define just one simple route for our entire CRUD operation and rest of things will handle the Laravel Livewire itself! It’s magic and amazing things! no routes for API and blah blah.

Route::view('contacts','admin.contacts');

 

Make a view for CRUD operation

Make view for CRUD operation inside views directory with the name contacts.blade.php . This view just for a wrapper for our Livewire CRUD component.

@extends('layouts.app')
 @section('content')
 <div class="container">
 <div class="row">
 <div class="col-md-6">
 @livewire('contact-component')
 </div>
 </div>
 </div>
 @endsection

Here you can see, this view contains nothing fancy. Here we just placed a livewire component which we’ll create later.

 

Make a model

Make a contact model for database operation of our CRUD app. Our table name is contacts with fields id, name, phone. Here timestamp is false because we are not included created_at and update_at fields in our table which are required by default for a Laravel model.

<?php namespace App;
 
 use Illuminate\Database\Eloquent\Model;
 
 class Contact extends Model
 
 {
 
 public $timestamps = false;
 
 protected $table = 'contacts';
 
 protected $fillable = ['name','phone'];
 
 }

 

Install Laravel Livewire

Install the Laravel Livewire package via composer command.

composer require livewire/livewire

 

Setup the layout file

Open the template layout file app.blade.php and put the Laravel Livewire style and script directive. add @livewireStyles before </head> and add @livewireScripts before </body> .

 

Create a Laravel Livewire component php class

We can make the Livewire component with the help of artisan command that provides the package but here we will create from scratch so that we can set up things that we are used to. To do that, create a Livewire directory inside app/Http directory and create a php class name with ContactComponent.php and put the code into it.

<?php
 
 namespace App\Http\Livewire;
 
 use Livewire\Component;
 use App\Contact;
 
 class ContactComponent extends Component
 {
 public $data, $name, $phone, $selected_id;
 public $updateMode = false;
 
 public function render()
 {
 $this->data = Contact::all();
 return view('livewire.contacts.component');
 }
 
 private function resetInput()
 {
 $this->name = null;
 $this->phone = null;
 }
 
 public function store()
 {
 $this->validate([
 'name' => 'required|min:5',
 'phone' => 'required'
 ]);
 
 Contact::create([
 'name' => $this->name,
 'phone' => $this->phone
 ]);
 
 $this->resetInput();
 }
 
 public function edit($id)
 {
 $record = Contact::findOrFail($id);
 
 $this->selected_id = $id;
 $this->name = $record->name;
 $this->phone = $record->phone;
 
 $this->updateMode = true;
 }
 
 public function update()
 {
 $this->validate([
 'selected_id' => 'required|numeric',
 'name' => 'required|min:5',
 'phone' => 'required'
 ]);
 
 if ($this->selected_id) {
 $record = Contact::find($this->selected_id);
 $record->update([
 'name' => $this->name,
 'phone' => $this->phone
 ]);
 
 $this->resetInput();
 $this->updateMode = false;
 }
 
 }
 
 public function destroy($id)
 {
 if ($id) {
 $record = Contact::where('id', $id);
 $record->delete();
 }
 }
 }

Look at the codes inside contact component class. Here we have done all the things that we have to do for CRUD operation. We have declared the public properties ( $data, $name, $phone, $selected_id, $updateMode ) which will be rendered into our component views. This component class do as like as a typical Laravel controller.

 

Create Laravel Livewire component views

Now create livewire/contacts directories inside views directory and make a file name with component.blade.php inside that.

views
 livewire
 contacts
 component.blade.php
 create.blade.php
 update.blade.php

Create component.blade.php view.

<div>
 <div class="title">Laravel - Livewire CRUD</div>
 
 @if (count($errors) > 0)
 <div class="alert alert-danger">
 <a href="#" class="close" data-dismiss="alert">&times;</a>
 <strong>Sorry!</strong> invalid input.<br><br>
 <ul style="list-style-type:none;">
 @foreach ($errors->all() as $error)
 <li></li>
 @endforeach
 </ul>
 </div>
 @endif
 
 
 @if($updateMode)
 @include('livewire.contacts.update')
 @else
 @include('livewire.contacts.create')
 @endif
 
 
 <table class="table table-bordered table-condensed">
 <tr>
 <td>ID</td>
 <td>NAME</td>
 <td>PHONE</td>
 <td>ACTION</td>
 </tr>
 
 @foreach($data as $row)
 <tr>
 <td></td>
 <td></td>
 <td></td>
 <td width="100">
 <button wire:click="edit()" class="btn btn-xs btn-warning">Edit</button>
 <button wire:click="destroy()" class="btn btn-xs btn-danger">Del</button>
 </td>
 </tr>
 @endforeach
 </table>
 
 </div> 

Create create.blade.php view.

<div class="panel panel-default">
 <div class="panel-heading">
 <h3 class="panel-title">New Contact</h3>
 </div>
 
 <div class="panel-body">
 <div class="form-inline">
 <div class="input-group">
 Name
 <input wire:model="name" type="text" class="form-control input-sm">
 </div>
 <div class="input-group">
 Phone
 <input wire:model="phone" type="text" class="form-control input-sm">
 </div>
 <div class="input-group">
 <br>
 <button wire:click="store()" class="btn btn-default">Save</button>
 </div>
 </div>
 </div>
 </div>

Create update.blade.php view.

<div class="panel panel-default">
 <div class="panel-heading">
 <h3 class="panel-title">Update Contact</h3>
 </div>
 
 <div class="panel-body">
 <div class="form-inline">
 <input type="hidden" wire:model="selected_id">
 <div class="input-group">
 Name
 <input wire:model="name" type="text" class="form-control input-sm">
 </div>
 <div class="input-group">
 Phone
 <input wire:model="phone" type="text" class="form-control input-sm">
 </div>
 <div class="input-group">
 <br>
 <button wire:click="update()" class="btn btn-default">Update</button>
 </div>
 </div>
 </div>
 
 </div>

our Laravel Livewire CRUD app is ready to use. Browse the example.com/contacts and test the CRUD operation by insert, editing and deleting the table records.

Conclusion

Laravel Livewire is really a magical frontend framework for Laravel. If you did all the steps correctly, I assure you that you will be impressed about Laravel livewire. Hope this step by step Laravel Livewire tutorial post will help you to make a simple CRUD application from scratch with Laravel Livewire. If it’s helpful to you then please share this post with others.

 

programming

via Laravel News Links https://ift.tt/2dvygAJ

February 27, 2020 at 09:44AM

Middleware-Based Authorization

Middleware-Based Authorization

https://ift.tt/2wbpMLi

If you’d prefer not to execute authorization from within your controller actions, you can instead handle it as a route-specific middleware. I’ll show you how in this episode.

Published on Feb 26th, 2020.

programming

via Laracasts https://ift.tt/1eZ1zac

February 26, 2020 at 01:20PM