Laravel Fireable Attributes

Fireable

Latest Version on Packagist StyleCI Build Status Total Downloads

An elegant way to trigger events based on attributes changes.

Installation

Install package through Composer

$ composer require envant/fireable

Usage

  1. Add the FireableAttributes trait to your model
  2. Define the attributes with specified events via the protected $fireableAttributes property on the model

Example

Let’s say we need to trigger specified events when specific model attributes are updated.

For example, you need to notify user when he gets an "approved" status. Instead of observing model’s "dirty" attributes and firing events manually we could do it more elegantly by assigning specified events to attributes or even certain values of attributes.

class User extends Authenticatable {  use FireableAttributes;   protected $fireableAttributes = [  'status' => [  'approved' => UserApproved::class,  'rejected' => UserRejected::class,  ],  ]; }

Also you may not need to track certain values, so you can assign an event directly to an attribute itself. So, in the example below, each time the user’s email is changed, the appropriate event will be fired.

class User extends Authenticatable {  use FireableAttributes;   protected $fireableAttributes = [  'email' => EmailUpdated::class,  ]; }

Change log

Please see the changelog for more information on what has changed recently.

Testing

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

via Laravel News Links
Laravel Fireable Attributes

How to Reveal Your Saved Wifi Passwords in Windows or macOS

Riddle me this: You’re out somewhere and you need to hop on a wifi network with a new device. You realize you have the wifi password saved on your laptop, but not on whatever device you’re looking to connect. And you’re either too lazy to ask for the password again, or you have no way to acquire it in your present condition.

What do you do? Easy. Pull out your laptop and look it up. Here’s how:

Windows

To find a saved wifi password, you have a few options. First, you can pull up a Command Prompt and type in this somewhat-complicated string:

netsh wlan show profile [NAME OF YOUR WIFI NETWORK] key=clear

You’ll want to replace the [NAME OF YOUR WIFI NETWORK] part with, well, the name of whatever SSID you’ve connected to. When you do, and hit Enter, you’ll see the password for said wifi network in the “Key Content” listing of the Security settings field—it should be pretty apparent.

If you’d like to try another way, you can pull up your passwords via the Windows 10 Settings app. Launch it, click on Network & Internet, scroll down a bit and click on Network and Sharing Center, click on the blue “Wi-Fi” link next to the “Connections:” field, click on “Wireless Properties,” click on the Security tab, and select “Show characters.”

There are other utilities you can try to get your passwords in an even simpler manner, but I should note that Windows Defender might not like them very much. At least, that was the case when I tried downloading Nirsoft’s WirelessKeyView—surely a harmless program, but one that makes Windows Defender freak out once it finishes transferring to your system.

Mac

On macOS, revealing up a saved wifi password is simple. First, you can pull up Terminal and type in the following:

security find-generic-password -wa [NAME OF YOUR WIFI NETWORK]

Same deal as before: Replace [NAME OF YOUR WIFI NETWORK] with exactly what it says. You’ll next have to authenticate into your system as an administrator, but once you do that, the password for whatever wifi network you typed in should appear within Terminal.

You can also just dig through Keychain—specifically, the Keychain Access application—to sniff out a saved password. Launch the application and click on the System Keychain in the upper-left corner. Find the wifi network you want to look up and double-click on it.

When you do, you’ll see a box that looks like the following. Click “Show Password” to do just that—after you authenticate yourself, of course.

via Lifehacker
How to Reveal Your Saved Wifi Passwords in Windows or macOS

Dealmaster: A bunch of Amazon devices are on sale for Prime members today

Dealmaster: A bunch of Amazon devices are on sale for Prime members today

Ars Technica

Greetings, Arsians! The Dealmaster is back with another round of deals to share. Today’s list is headlined by a new round of discounts on Amazon devices, including the company’s Fire TV Stick streamers, Fire tablets, and Kindle e-readers, among others. The catch? Most of the discounts are for Prime members only.

Still, that covers a whole lot of people, and a few of the discounts here either match or come close to the prices we saw during Amazon’s Prime Day event in July. The company’s

latest (and waterproof) Kindle Paperwhite

, for one,

is down to $90

, while the

entry-level Kindle

is down to $65. Both are $5 more than they were on Prime Day. At $50 and $30, respectively,

the Fire HD 8

and

Fire 7

are now matching their Prime Day prices and are still generally worthwhile choices for people wanting to spend as little as possible on a tablet. The

Fire TV Stick 4K

and 1080p

Fire TV Stick

aren’t as steeply discounted, meanwhile, but they’re both $15 off for those in need of a new streaming stick. The company’s

Cloud Cam

security camera and

Echo Show 5

smart display are significantly discounted for those who don’t have Prime, too.

The big caveat here is that Amazon is announcing new hardware of some sort next week. The company held an event last September where it mainly introduced new Echo devices and other smart home accessories, so it’s not certain that the Fire and Kindle devices here will be replaced, but there’s at least some chance that these discounts are designed to clear out inventory. Still, most of what’s here is a good value all the same. And if you’re not interested in having more Amazon in your life, we also have deals on Roku streamers, Logitech keyboards and mice, external hard drives, and more. Have a look at the full rundown below.

Note: Ars Technica may earn compensation for sales from links on this post through affiliate programs.

Table of Contents

Top 10 deals of the day

Amazon device deals

  • Prime only: Amazon Fire TV Stick 4K HDR media streamer for $34.99 at Amazon (normally $49.99).
  • Prime only: Amazon Fire TV Stick 1080p media streamer for $24.99 at Amazon (normally $39.99).
  • Prime only: Amazon Fire TV Recast (500GB) over-the-air DVR for $169.99 at Amazon (normally $229.99).
  • Prime only: Amazon Fire HD 8 (16GB, ads) tablet – 8-inch 1280×800 for $49.99 at Amazon (normally $79.99).
  • Prime only: Amazon Fire 7 (16GB, ads) tablet – 7-inch 1024×600 for $29.99 at Amazon (normally $49.99).
  • Prime only: Amazon Kindle Paperwhite (8GB, ads) e-reader for $89.99 at Amazon (normally $129.99).
  • Prime only: Amazon Kindle (4GB, ads) e-reader for $64.99 at Amazon (normally $89.99).
  • Amazon Cloud Cam 1080p security camera for $89.99 at Amazon (normally $119.99).
  • Amazon Echo 5 smart display for $64.99 at Amazon and Best Buy (normally $89.99).

Laptop and desktop PC deals

  • Apple Mac Mini (late 2018) – Intel Core i3-8100B, 8GB RAM, 128GB SSD for $699 at Amazon (normally $749.99).
  • Samsung Chromebook Plus V2 laptop – Intel Core m3-7Y30, 12.2-inch 1920×1200 touch, 4GB RAM, 128GB eMMC for $399 at Best Buy (normally $449.99).
  • Asus ROG Strix G gaming laptop – Intel Core i5-9300H, 15.6-inch 1080p 120Hz, 8GB RAM, 512GB SSD, GTX 1660 Ti 6GB for $999 at Walmart (normally $1,299).
  • Lenovo ThinkPad P53 mobile workstation laptop – Intel Core i7-9750H, 15.6-inch 3840×2160 OLED touch, 16GB RAM, 512GB SSD, Nvidia Quadro T2000 4GB GPU for $1,484.45 (use code: THINKSEPT - normally $1,899).
  • Dell XPS Tower desktop – Intel Core i7-9700, 16GB RAM, 512GB SSD, GeForce GTX 1050 Ti for $949.99 at Dell (use code: DTXPSAFF1 – normally $1,399.99).
  • AMD Ryzen 7 2700X 8-core/16-thread desktop processor for $197.99 at Amazon and Newegg (normally $239.99).

Video game deals

Gaming deals

TV and home entertainment deals

Electronics deals

Accessories and miscellaneous deals

  • LEGO Ideas NASA Apollo Saturn V 21309 kit (1,900 pieces) for $99.99 at Amazon (normally $119.99).
  • Instant Pot Ultra (6qt) electric pressure cooker for $83.77 at Amazon (normally $109).
  • Anker PowerPort Atom III wall charger – 60W, 45W USB-C PD, 1x USB-A for $31.99 at Amazon (normally $42.99).
  • Anker Roav Viva smart car charger – Alexa, 2x USB-A for $19.96 at Amazon (clip 11% coupon – normally $35.99).
  • Anker PowerWave Pad wireless charger – 10W for Galaxy phones, 7.5W for iPhone for $9.99 at Amazon (use code: LABOR2503 - normally $17.99).
  • Anker PowerLine II 3-in-1 charging cable – USB-C, microUSB, Lightning for $11.24 at Amazon (use code: ANKER8436 - normally $17.99).

via Ars Technica
Dealmaster: A bunch of Amazon devices are on sale for Prime members today

A Peek Into the Soviet Computer Revolution

One of the largest and coolest collections of Soviet computers in the world resides in an apartment complex in Mariupol, Ukraine. Dmitriy Cherepanov started Club 8-bit with a small collection of computers built when the Soviet bloc was crafting its own personal computers.

It’s like looking into an alternative universe. The machines popular to kids growing up in the Soviet bloc look just different enough from what we’re familiar within the western world, but still carries that same since of nostalgia you or I might get for a Commodore 64 or Macintosh II.

Cherepanov has been collecting and restoring these computers for over a decade, and his museum of PCs is a fascinating look at the wide scope of the 80s PC revolution.

via Gizmodo
A Peek Into the Soviet Computer Revolution

Behold the power of shotgun

Good news from The Sun UK:

IN HIS SIGHTS SAS hero kills five terrorists in seven seconds with shotgun to stop ‘suicide bombing’

AN SAS hero armed with a shotgun reportedly killed five terrorists in just seven seconds to stop a suicide bombing attack.

The Brit soldier had stormed a bomb factory as part of an SAS raid on an ISIS outpost in Baghdad, Iraq.

As the SAS ‘breach team’ entered a courtyard, they were confronted by a group of heavily armed jihadis.

One of the brave Brits fired at them with his Benelli M4 Super 90 semi-automatic shotgun, killing three would-be bombers.

Another two terrorists appeared from a building and he reportedly shot them dead as well.

Several other jihadis then emerged, but immediately surrendered after seeing two of the bodies “didn’t have heads”, reports claim.

Ha ha ha, fuck yeah!!!

I’m reminded of what the great Clint Smith said about shotguns:

Shotguns at the right range with the right load will physically remove a chunk of shit off your opponent and throw that shit on the floor.  And you have to get someone to come in and clean this shit up with a shovel.”

Apparently that SAS operator was at the right range with the right load and that chunk of shit was Muhammad Bin Terrorist’s head.

“The terrorists were no more than a few feet away when the SAS team came face to face with them,” the source said.

“They had just finished morning prayers and were loading weapons into a vehicle. We now think they were about to carry out an attack.

“One of the breach team opened fire…it was a case of bang, bang, bang, then bang, bang. It was over in seven seconds.”

Suicide vests filled with slabs of plastic explosives and ball bearings were found on two of the dead jihadis.

The vests are understood to have been designed for mass casualties.

I remember being told a story by one of my Marine buddies.  They were having problems in Iraq where they would shoot some terrorist in a breaching operation but the terrorist had enough time before dying to pull the pin on a grenade or set off explosives and get the Marines who entered the room.

So a few of them bought 1 oz. deer slugs when they got rotated back home and loaded those up in their shotguns on their next deployment.

A 1 oz. deer slug hitting center of mass at no more than 10 yards is so traumatic that it shuts a human being off like a light.

There is nothing like the power of a 12 gauge scattergun at close range for ending threats.

via
Behold the power of shotgun

How Colored Pencils are Made

How Colored Pencils are Made

Link

We’ve seen footage of pencils being made before, but the guys at Faber-Castell want us to know that their process is the best. Watch as they make black leads from graphite and clay, and colorful ones from powders and wax, then sandwich them into wooden shells, and paint them to match.

via The Awesomer
How Colored Pencils are Made

ClamAV Anti-Virus Validator for Laravel

ClamAV Anti-Virus Validator for Laravel

ClamAV Validator is a Laravel package by Krishnaprasad MG that provides a custom virus validator based on ClamAV antivirus scanner for file uploads.

Some setup is required to use this package—you need to install ClamAV antivirus scanner on your server to make this package work.

Once you have configured your servers, you use this rule like any other validation rule:

$request->validate(['upload' => 'clamav']); 

To learn more about the underlying anti-virus engine, check out the ClamAV antivirus website.

You can learn more about the ClamAV Validator package, get full installation instructions, and view the source code on GitHub at sunspikes/clamav-validator.


Filed in: News


Enjoy this? Get Laravel News delivered straight to your inbox every Sunday.

No Spam, ever. We’ll never share your email address and you can opt out at any time.

via Laravel News
ClamAV Anti-Virus Validator for Laravel

The Empire Strikes Axe

The Empire Strikes Axe

Link

Star Wars tribute band Galactic Empire bangs out an awesome hard rock cover version of John Williams’ The Imperial March, giving the Empire’s most iconic theme song an appropriately razor-sharp edge to accompany all of their evil deeds. Even Emperor Palpatine approves, and he’s not easy to please.

via The Awesomer
The Empire Strikes Axe