Sequel Ace MySQL Client for MacOS

Sequel Ace MySQL Client for MacOS

https://ift.tt/2O8dfhK


Sequel Ace is the sequel to longtime MacOS tool Sequel Pro, a popular go-to application for many developers to manage MySQL and MariaDB databases.

Sequel Ace takes the torch as a fork of the popular Sequel Pro app, (which was itself a fork of CocoaMySQL). If you’re not aware, recently, Sequel Pro has become somewhat unstable, frequently crashing for many, and developers are generally flocking for other apps.

In light of the state of Sequel Pro, collaborator Jakub Kašpar opened an an issue on the sequelpro repo with the following description:

Hey everybody!

After months of complete inactivity on this project, and months/years without any release, the time has come and community took over and forked Sequel Pro.

For months there was also no activity from Core team on Slack, so I think this was and is the right move. With almost 1100 open issues, it’s currently not likely to make this project alive again.

I updated Readme today to let everyone know what’s happening and I’ll pin this issue.

New project is called Sequel Ace and is available also on Mac AppStore.

Please refer to the new project and give it a try – https://ift.tt/3eJOgNf

If you find any issues or you have some feature request, open an issue there, not here in this repo.

Thanks for your patience over last couple of months and I hope we will be able to keep this project alive under different name.

Thanks, Jakub

You can install Sequel Ace from the App Store or through the MAS CLI:

brew install mas-cli/tap/mas
mas install 1518036000

To learn more about Sequel Ace, you can get installation instructions and view the source code on GitHub at Sequel-Ace/Sequel-Ace. We will have an eager eye out to see how Sequel Ace progresses, and hope for the project’s continued growth!

Filed in:
News

programming

via Laravel News https://ift.tt/14pzU0d

July 8, 2020 at 09:22AM

Laravel Debugbar vs. Telescope Toolbar

Laravel Debugbar vs. Telescope Toolbar

https://ift.tt/2O1Wxk5


TLDR;

Give both a go. If you already use Telescope, I would recommend Telescope Toolbar to prevent overhead.
Otherwise I still prefer Laravel Debugbar, but if you feel it’s too heavy, give Telescope Toolbar a try!

Let me know if you have any improvements for Telescope Toolbar or (Laravel) Debugbar!

A little history

When we started using Laravel at Fruitcake, it was around the time of Laravel 3. It didn’t have Composer support yet and was a bit limited, but did contain things like Eloquent and Blade templates.
One of the things it also contained was a small toolbar called ‘Anbu’, created by Dayle Rees.

Anbu

When Laravel 4 came around the corner, it was pretty great with Composer support etc. But there were 2 main issues we had with it:

  • PhpStorm didn’t understand Facades
  • No more (Anbu) development toolbar

For the first one, I created laravel-ide-helper and for the second one, I came accross PHP Debugbar.

Taylor starred Debugbar

After toying around with it, I quickly got a proof-of-concept working. And just before the official Laravel 4.0 release at the end of 2013, Laravel Debugbar was released, already providing most of the features you use today:

Debugbar V1

During the last 7 years the layout changed to make it Laravel specific, new collectors have been added and functionality has improved (also upstream to debugbar).

Debugbar V3

5 years after (November 2018), Laravel released Laravel Telescope, giving Laravel developers a first-party tool. Not a direct replacement for Debugbar, but it does have similar functionality.

Laravel Telescope

During the last 7 years, the core of Debugbar didn’t change and was still using a lot of jQuery. I looked into the Symfony toolbar as modern alternative a few times, but it didn’t warrant such a big rewrite.
When Telescope launched, I liked the general approach with Storage etc and Symfony Toolbar was now decoupled enough to use stand-alone. Thus Laravel Telescope Toolbar was born.

Telescope Toolbar

I recently did a poll to see how many of my followers use Telescope or Laravel Debugbar, and the majority at this moment still uses Debugbar (which is great!)

Technological differences

Laravel Debugbar uses Collectors to gather data during the request cycle. At the end of the request, all data is collected, formatted and stored (usually in the storage dir, but DB can be used). For normal requests, the data is then flashed in the session and rendered on the next requests. For ajax requests the ID is passed in the headers and loaded through an EventListener on XHR requests. All gathered data is loaded and formatted directly by the Debugbar, which can cause delays for large datasets (eg. 1000+ queries). This usually isn’t a big problem, but more of an indicator that you should optimize 😉
3rd party libraries are used (Font Awesome, Highlight.js, jQuery), but these are scoped to avoid interference.

Debugbar Dependencies

Telescope Toolbar only displays data that is already gathered by Telescope. The data is always loaded async, after the page has loaded, for both normal and ajax requests. No external dependancies are used to prevent library collisions, just plain Javascript and SVG icons. The Toolbar content is rendered by PHP (Blade templates), so it doesn’t freeze your browser when displaying a lot of data (that much), and it’s easier to show just the summary and redirect to Telescope for the rest.

In short;
Debugbar is both the toolbar and the detailed info, Telescope Toolbar is just the toolbar and leverages Telescope for the rest.
Telescope Toolbar is less browser-heavy, but doesn’t show all information in the toolbar itself.

Features

Both toolbars provide the same basic functionality:

  • Debug queries
  • Show current route/controller
  • Request data
  • Views, Mail, Gates, Cache, Auth etc.

But I’ll highlight a few differences.

Debugging Queries

Both Debugbar and Telescope Toolbar show the query (with replaced bindings), duration and caller.
Queries Toolbar

Debugbar also uses syntax highlighting to format the query.

Queries Debugbar

While Debugbar has some extra features (like more backtrace info, or EXPLAIN calls), the most common case is covered for bot.

Showing Ajax Requests

Both toolbar will catch and load Ajax requests automatically. With Toolbar this can be toggled off.

Ajax Toolbar

Telescope Toolbar even shows the running requests + details while Debugbar only adds the entry to the list (and switches data).

Ajax Toolbar

Debugbar also offers a Browse function, but for Telescope Toolbar you can just look in Telescope itself.

Ajax Debugbar

Timeline

Telescope does not offer a Timeline (yet), but with Laravel Debugbar you have a Timeline by default where you can add your own measurements.
You can also render Queries or Events in the timeline, to see where a lot of processing time happens.

Timeline Debugbar

Dumping data

Some people prefer dd() Driven Development, but this breaks the request. I prefer debug() Driven Development.
Both toolbars have a debug() method that work just like dump() but outputs it in the toolbar instead of die()‘ing.

Dump Debugbar

Dump Debugbar

Both use the great Symfony Vardump (like dump() and dd()) to create nice dumps.

Telescope Toolbar is limited to what Telescope provides. It’s not really easy to extend Telescope with custom collectors, so your best hope is to create a PR that is accepted.

With Debugbar you can add your own collectors, or also submit it as a PR, most recently the Model Count from @reinink

Dump Debugbar

On the other hand, Telescope provides nice features like Exception tracking and Queue/Commands

Alternatives

An alternative approach is Clockwork, which doesn’t inject a toolbar directly. All data is rendered by a Chrome Extension.
So you might need to install some more, but could prevent some overhead

Clockwork

programming

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

July 7, 2020 at 10:09PM

PHP Scraper

PHP Scraper

https://phpscraper.de


An opinionated web-access library for PHP

by Peter Thaleikis

Accessing the web from PHP can done easier. This is an opinionated wrapper around some great libraries.

The examples tell the story much better. Have a look!

This project is sponsored by:

Want to sponsor this project? Contact me.

Idea

Access websites and collecting basic information of the web is too complex. This wrapper around Goutte makes it easier. It saves you from XPath and co., giving you direct access to everything you need.

Examples

Here are some examples of what the library can do at this point:

Most other information can be accessed directly – either as string or an array.

Scrape Content, such as Images:

Some information optionally is returned as an array with details. For this example, a simple list of images is avaiable using $web->images too.

More example code can be found in the sidebar or the tests.

Installation

As usual, done via composer:

This automatically ensures the package is loaded. You can now use any of the above noted examples.

Contributing

Awesome, if you would like contribute please check the guidelines before getting started.

Tests

The code is roughly covered with end-to-end tests. For this, simple web-pages are hosted under https://ift.tt/2Z9wyO4, loaded and parsed using PHPUnit. These tests are also suitable as examples – see tests/!

This being said, there are probably edge cases which aren’t working and may cause trouble. If you find one, please raise a bug on GitHub.

programming

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

July 7, 2020 at 10:09PM

Basic UI components for Tailwind CSS

Basic UI components for Tailwind CSS

https://ift.tt/3dxs48E


Sail UI

Basic UI components for Tailwind

Buttons

Input

Cards

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias explicabo fuga inventore neque quia vitae
voluptatum? Atque ea eaque fuga illum molestias provident, quam saepe.

Alerts

Normal stuff! zero concerns.

All is clear! So far so good.

Fantastic! You did it.

Watch out! Things are going down south.

Too late! It’s hit the fan.

Badges

Default

Light

Blue

Green

Yellow

Red

Typography

Lorem Impsum

Lorem ipsum dolor sit

Lorem ipsum dolor sit amet.

Lorem ipsum dolor sit amet, consectetur.

Lorem ipsum dolor sit amet, consectetur adipisicing.
Lorem ipsum dolor sit amet, consectetur adipisicing elit.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium aperiam architecto aspernatur
consequuntur cumque eaque, eveniet explicabo facilis fugit mollitia, neque non officia qui, quidem quisquam
sequi sunt unde voluptatem.


 View on Github

programming

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

July 7, 2020 at 10:09PM

Digital Marketing Tools Every Marketer Should Use in 2020

Digital Marketing Tools Every Marketer Should Use in 2020

https://ift.tt/2CjE1kg

Featured image by PopTika

Digital marketing is now a must for increasing brand awareness and sales. Moreover, you’ll find countless platforms, apps, software programs, and other marketing tools to help. In fact, experienced marketers rely on many of these tools and platforms to boost their sales.

In this post, we introduce you to some important tools you should turn to if you want to increase the return on your marketing investment in the months to come.

Ahrefs

There are plenty of marketing tools that can help you boost your SEO, or search engine optimization. Different sites and apps use various metrics to analyze the quality of web pages and social media networks.

There might be a small variation in the results of different tools. However, most marketers are satisfied with Ahref.com.

Ahrefs, a digital marketing tool

Ahrefs is a startup founded in 2011. It provided the first edition of Site Explorer and thereby changed approaches to backlink analysis. Now it is widely used among software developers and SEO experts and is one of the world’s best analytics tools.

However, you don’t have to go all the way to the Ahrefs site to analyze web pages, websites, and keywords in terms of SEO metrics. Instead, you can use the Ahrefs SEO Toolbar, a Google Chrome extension. This will provide you with the most important keyword metrics right on the SERP (search engine results page).

These metrics are:

  • Search volume, both global and country-specific
  • Keyword difficulty (KD)
  • Clicks
  • Cost per click (CPC)

Moz

Moz is another useful tool if you want to create SEO-optimized articles that will bring traffic to your website.

Moz, a digital marketing tool

It has been called the biggest SEO community in the world, and it is building tools to make content marketing easy.

Moz also has a Google Chrome extension that can provide you with free analytics data such as page authority (PA), domain authority (DA), spam scores, and so on. This makes it the best tool for learning about a site’s authority.

Google Trends

With this marketing tool, you can better understand how to use Google data to tell your stories in a way that better promotes your brand.

RELATED ARTICLE: SOCIAL MEDIA MARKETING WILL HELP YOU TO HUMANIZE YOUR BRAND

Google Trends is a website that provides analyses of the popularity of top search keywords in Google Engine. The website provides graphs where you can compare the search results of different queries over time in different regions and languages.

Google Analytics

Google Analytics is a platform inside the Google Marketing Platform. It tracks and reports website traffic.

With this tool, you can check the return you’re getting on your investments in marketing, content, and products. Then you can optimize your performance accordingly. Google has unparalleled insights and machine learning capabilities. These can be vital for your business.

LinkedIn Sales Navigator

LinkedIn Sales Navigator gives you access to sales experts, marketers, and businesses. Here, you’ll gain a wider reach and can thereby better search for potential customers.

Since it is an employment-oriented network, it gathers together a whopping number of individual users, professionals, and companies. Therefore, the Sales Navigator can be of great use for generating leads and converting them into sales. This makes it a powerful marketing tool. It has also a Google Chrome extension that facilitates the process.

Grammarly

Content generation is a must for every marketer and business owner. Therefore, every marketing campaign needs writers to continually prepare compelling and creative content.

As you know, grammatical mistakes are every writer’s nightmare, and content marketers are no exception.

But Grammarly is an efficient tool that provides free automatic grammar checking, whether you’re writing a marketing piece or an email. Using its Google Chrome extension, you can easily bring your content into a Grammarly sheet and check your grammatical mistakes.

However, you might become addicted to using this tool. Many people cannot imagine a working day without it. This tool will improve your copywriting. Perhaps even more importantly, it can suggest essential edits for your professional emails.

Social Media Automation Tools

Nowadays, every marketer and business owner needs social media automation tools for their online marketing strategy.

Here is a list of several popular automation tools, each of which provides different important and useful features:

  1. Agora Pulse
  2. Hootsuite
  3. Buffer
  4. Crowdfire
  5. CoSchedule

RELATED ARTICLE: HOW TO INTEGRATE EMAIL WITH SOCIAL MEDIA FOR A POWERFUL MARKETING STRATEGY

The ability to schedule your social content is one of the most important advantages of social media automation tools.

RELATED ARTICLE: HOW TO EFFECTIVELY SCHEDULE SOCIAL MEDIA CONTENT

Awario

Awario is basically an analytics tool for social networking sites and apps. It covers all the top social media services in the world. Also, this tool helps you to easily search for relevant influencers and build long-lasting relationships with them, which is a powerful way to boost your marketing reach.

With this tool, you can be aware of recent mentions about your niche and brand. Monitoring the most active advocates in your industry is a useful feature that Awario will provide you with. Basically, this tool is good for finding influential people in your niche.

Just search for the relevant keywords, and Awario will sort social media influencers and bloggers based on their reach, their number of followers, or their blog’s traffic.

Social Tradia

One of the most crucial parts of embarking on a new business is to establish social media accounts and gain followers. If you want to do it by yourself, it can be tedious and time-consuming. Therefore, acquiring and customizing well-known accounts can be a wise course of action.

Social Tradia claims that they are the ultimate hub when it comes to transferring Instagram accounts. If you follow the social media market, you know that transferring social media accounts via public channels is nearly impossible.

Social Tradia was born in 2016 in Toronto, Canada. It provides safe and secure transactions over verified accounts. Actually, they do everything you need in the process of acquiring and customizing an Instagram account. This includes screening, safety, anonymity, and quality control.

Many influencers sell their Instagram accounts. Social Tradia is one of the best sites that can facilitate the transferring process.

Free Image Collections

You probably know that many people enjoy multimedia content such as images, videos, infographics, and so on. Use these to break up long and otherwise tedious texts. As the old saying goes, “A picture is worth a thousand words.”

You need to generate creative visual content if you want to keep your followers. Of course, you cannot produce all of this content by yourself. That would be far too costly and time-consuming.

However, there are a lot of useful tools and sites which provide you with high-quality images at no charge. For example, Unsplash.com and freepik.com are two popular sites that provide thousands of images in various categories.

Make Use of These Digital Marketing Tools to Increase Awareness of Your Brand

These tools will help you with your online marketing. However, there are many other tools besides these. Take time to learn about them and you’ll go far in boosting your business.

Always remember, however, that no matter how good a tool is, you need far more to create successful digital marketing. For example, you also need to learn how to build a sales funnel, generate leads, and build customer trust.

So bookmark the Business Opportunities site and come back often. The content we offer here will help you learn what you need to learn in order to boost sales for your business.

The post Digital Marketing Tools Every Marketer Should Use in 2020 appeared first on Business Opportunities.

business

via Business Opportunities Weblog https://ift.tt/2CJxLjg

July 7, 2020 at 10:50PM

Keltec’s P17: It’s a very good handgun, if you can find one

Keltec’s P17: It’s a very good handgun, if you can find one

https://ift.tt/3e7ytH0

In April I put up a "first look" article about Keltec’s new P17 .22 pistol.

If you missed the earlier article, please read it before continuing, as this review continues from that point and doesn’t repeat the same information.

The great thing about this pistol – and it really is a great thing, compared to some of its rivals – is that it’s boringly reliable.  Many .22 firearms are very "picky" about what ammunition they like.  Some will shoot well with this round, but not with that one.  The "pickiness" may even be visible among pistols of the same make and model.  Not so with the P17.  I’ve fired seven different rounds through it so far:

All performed without a hiccup through the P17, which surprised me.  I was expecting at least a few mis-feeds or failures to fire, on the basis of many years’ experience with .22LR pistols.  This one didn’t even blink.

The P17 also shot relatively "clean".  .22LR rounds are notorious for leaving powder and lead fouling behind them, requiring some pistols to be cleaned after a few hundred rounds in order to continue functioning smoothly.  (That happened to me most recently with a Ruger Mk. IV, which surprised me;  earlier marks had not given rise to that problem.)  The P17 got dirty, sure, but its function never wavered, and its action remained as smooth as ever, even during a thousand-round torture test run over several days without cleaning or lubrication.  That’s a good sign.

The sixteen-round magazines (three are provided with the pistol) are a big plus point.  Most .22LR pistols I know are sold with 10-round magazines, and only two of them at that.  There’s nothing wrong with that, but it means more frequent reloading in high-round-count usage.  The P17 can shoot 48 rounds to an "average" pistol’s 20 before needing to reload its magazines, a 140% improvement over the lower-capacity weapons out of the box.  That’s very useful.

Accuracy was fine, well up to industry standards.  The P17 isn’t a target pistol with finely-adjustable sights, but it’s well up to plinking use, and I wouldn’t object to an informal target-shooting competition with it.  The trigger is very controllable, with an easy let-off that makes accuracy easier.  The checkering on the grip isn’t anything to write home about, not providing much friction against your hands;  but we’re talking about minimal recoil here anyway, so that’s not an important factor to me.  Certainly, I’ve found the gun very controllable through hundreds of rounds.  If you want something with greater friction, you can install a grip sleeve, or add something like skateboard tape to the front and rear straps.

Perhaps the nicest thing about the P17 is its price point.  Its recommended retail price, complete with 3 magazines, is only $199.99!  That’s astonishing value for money in today’s market.  It definitely vaults the P17 to the top of the list of rimfire pistols I recommend to others.

For another perspective on the P17, here’s a brief review from the NRA Gun of the Week channel.

I really can’t think of any negatives about the P17.  Keltec has come up with a winner here.  I’ll put my name on the list to buy a couple from my local gun shop, when they eventually get them in stock.  The current shortage of firearms, thanks to panic buying following the coronavirus pandemic and George Floyd-inspired riots, means I’ll probably have to wait a long time . . . but the P17 is worth waiting for, IMHO.

In case you’re wondering, no, I’m not being compensated in any way to do this review.  I value .22 pistols very highly as a training tool, and as a defensive weapon for disabled shooters who can’t handle the recoil of anything more powerful (see my earlier article on the subject).  That’s why I wanted to review the P17.  Now that I’ve done so, the two review guns (generously donated by Keltec) will be passed on (free of charge) to two disabled shooters, who need them far more urgently than I do!

Peter

non critical

via Bayou Renaissance Man https://ift.tt/1ctARFa

July 7, 2020 at 10:05AM

The Battle of the Wokes.

The Battle of the Wokes.

https://ift.tt/2Z4SMAE

Today is gonna be busy for me, but I wanted to leave you with something entertaining. I caught this via Legal Insurrection  and it is a Zoom meeting among the NYC Community Education Council for Manhattan District 2 members about some Karen (AKA Robin Broshi )  accusing another member of racism for having a brown kid bouncing on his lap as if it was a woke prop or some horseshit like that. It becomes a “Who is woker than me?” fest  after that.

It is along meeting, but just fast forward to the scenes with Ms. Broshi in it and let it rip. Don’t worry, you will figure out easily who she is.

Make plenty popcorn.

After you are done laughing, remember this sobering thought: This people and people like them in your locality, decide what your children are supposed to learn.

 

guns

via https://gunfreezone.net

July 7, 2020 at 10:15AM

In Netflix’s New Transformers Trailer, Even Optimus Prime Is So Very Tired

In Netflix’s New Transformers Trailer, Even Optimus Prime Is So Very Tired

https://ift.tt/3gz0I2V


Optimus Prime is having a rough day or six in the final hours of the war for Cybertron.
Screenshot: Netflix

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

Another day, another war for the fate of Cybertron, and things are looking dire in Netflix and Rooster Teeth’s take on the latest version of the Transformers origin story. So dire that even Optimus Prime, scion of hope and occasional truck, is getting a bit defeatist.

Netflix just dropped the latest trailer for Transformers: War for Cybertron: Siege, the first in a planned three-show series (of six episodes each) it’s developed with Hasbro, Rooster Teeth, and Godzilla: Monster Planet’s Polygon Pictures. Inspired by the recent toylines from Hasbro—named Siege and Earthrise, and to be followed up by a third, currently untitled series—the show depicts re-imagined takes on the first generation of Autobots and Decepticons as we knew them in the beloved Transformers animated show, as they fight for the fate of Cybertron in the final hours of their infamous civil war.

It’s a tale told many times over, most recently in the glorious opening sequence of Bumblebee, but this latest iteration being a whole TV show to itself gives us a chance to explore the impact the titular war has on its participants, even if we know it’s really not going to go all that well for the good guys. Especially Optimus Prime, who’s beginning to realize that in this trailer, as he grapples with the idea that his leadership of an Autobot resistance against Megatron—who’s planning to use the source of all Cybertronian life, the Allspark, to forcibly convert the Autobots to his Decepticon ethos—is just prolonging misery through extended periods of murder.

Wow, dude. Why don’t you just call yourself Pessimus Prime with that attitude?

G/O Media may get a commission

You’ll be able to see for yourself why Optimus is so glum when Transformers: War for Cybertron: Siege drops on Netflix on July 30.


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

geeky,Tech

via Gizmodo https://gizmodo.com

July 6, 2020 at 09:42PM

Best Batons for Self-Defense: The Good, the Bad, & What to Buy

Best Batons for Self-Defense: The Good, the Bad, & What to Buy

https://ift.tt/38wE6gN

The baton is one of the oldest weapons that’s still used today – and with good reason!

A wide variety of cultures and civilizations have been using batons and other clubs for thousands of years.

After all, who can deny the value of a hefty piece of wood or metal in the ancient game of survival?

Rosa-Is-Baton-Ready
We should all be as ready as Rosa. Gotta love that quick release!

These days, firearms tend to be the go-to when it comes to putting meat on the table. But that doesn’t mean the modern baton has lost its value. Police, security guards, and military powers around the world still use truncheons as defensive weapons.

And you can too!

Talon Infinity Baton, 50cm
Talon Infinity Baton, 50cm

For many people, batons are a popular and budget-friendly option for personal and home defense.

Have we perked your interest yet? Good.

Today, let’s take a closer look at the pros and cons of owning a baton and review my top baton choices for self-defense.

Disclaimer: we’re not lawyers so you should check your local laws for baton ownership and use!

Table of Contents

Loading…

Why a Baton?

Alright, fine. We know a baton may not have the same visual impact or “cool factor” as a firearm, at least at first glance. But we aren’t snobs, so let’s start by discussing why you should consider a baton for your self-defense needs.

Pros:

Less Lethal: A baton doesn’t require the use of lethal force. As a situation escalates or deescalates, you can quickly adjust your level of force without switching defensive tools.

Fry vs. Batons
Batons are a less lethal method of self-defense. Even in the far future, Fry will be okay. Probably. Remember, a baton is still a weapon.

Multipurpose: Batons are great for broad strikes and jabs, blocking attacks, and can even sweep an attacker’s legs out from underneath them. They can also be useful in other emergency situations, such as breaking windows to escape your car or home.

Simple: Batons are easy to use. They require no power or ammunition, can’t suffer from mechanical failure, don’t expire, require little maintenance, and rarely need replacing. Talk about reliability!

Affordable: A high-quality, lightweight, and concealable baton can run around $100, but it’s also easy to find equally effective options for less than $50.

Win Win Situation
Easy to use, affordable, and legal to carry? That is a win-win-win situation!

Effective: You can do pretty significant damage with a baton, even without a lot of strength or strict form.

Legality: Batons are legal in many places where other weapons aren’t and generally don’t require a permit or registration. This is especially true for items that can serve as a baton but aren’t strictly made for self-defense, like baseball bats or hefty flashlights. 

Relatively Easy to Conceal: Batons, particularly collapsible models, can easily slip into bags and deep pockets. At home, you can covertly rest the weapon next to your bed, in a nightstand drawer, or by the doorway. 

Safe: With a baton, you don’t have to worry about accidental discharges, and there is very little risk of self-injury. Plus, they are typically bystander-safe, so long as you don’t go wild.

Don't Be This Guy
Don’t Be This Guy. He has the right spirit but needs to complete a few more safety courses.

We condone only responsible baton-use in this house!

Ready to Buy? Consider These Drawbacks First

Are you feeling the tingles of baton envy yet?

We share the hype, but before you race off to the store, let’s examine the downsides of baton ownership.

Cons:

Less Lethal: Guns are more effective at stopping or deterring an attacker. It’s just a fact.

But Still Lethal: A single baton strike – intentional or accidental – can result in severe and even fatal injuries. A baton may be “less lethal,” but it’s still a weapon that needs to be handled with respect and consideration, much like any firearm.

I've Made a Huge Mistake
Be careful! You could face serious legal repercussions for intentionally or accidentally harming someone with a well-placed strike.

Expense: Yes, batons are more affordable than handguns, but they’re often more expensive than other handgun alternatives, like pepper spray and stun guns.

Training: Compared to other defensive weapons, batons are relatively easy to use. That said, you still need to train if your goal is to be effective during an altercation. Practice makes perfect, after all, and you want to keep your skills up.

Range: A baton is a melee weapon. It doesn’t provide the range of a firearm, pepper spray, or taser. This could leave you in a vulnerable position if your attacker is armed with a ranged weapon.

Knife to a Gun Fight
The same principle applies to batons.

Legality: Batons are legal in most places but not everywhere, including states like California. Check your local laws before purchasing or carrying any weapon. 

I’m Buying a Baton! What Are My Options?

Shopping for a new weapon can be exciting and overwhelming, especially online. It’s important to do your research before taking the plunge and coughing up your hard-earned cash.

To help you start the process, let’s take a look at a few batons that rate highly as self-defense tools.

1. ASP Batons

Armament Systems & Procedures (ASP) manufactures an impressive collection of expandable batons, but three products are a cut above the rest: the Talon Infinity 50cm, the Friction Loc Baton 21”, and the Agent Infinity Concealable Baton 40cm.  

These batons may be pricier than other options, but it’s a reflection of their quality. Plus, your purchase comes with a lifetime warranty!

Talon Infinity Baton, 50cm
Talon Infinity Baton, 50cm

ASP advertises the Talon Infinity 50cm as the “most advanced tactical baton in the world, period.” To ensure precision and reliability, the manufacturer specifically designed this product with a limited number of moving parts and offer a textured Vector grip option.  

145

at Optics Planet

Prices accurate at time of writing

Prices accurate at time of writing

Made from 4140 steel, this high-quality baton opens with a quick flick of the wrist and closes into the scabbard with a push of the end cap. Its retracted length is a little over 8”, so you’ll probably need a holster or bag to carry it comfortably.

The weight for this product varies because ASP offers a Steel model at 18.3 ounces and a lighter Airweight edition at 11.2 ounces.

Friction Baton 21"
Friction Loc Baton 21″

Another popular baton is ASP’s Friction Loc Baton 21″. This model is a tactical impact weapon commonly used by law enforcement personnel across the United States.

The Friction Loc Baton 21” has a slender shape and telescoping construction that allows for fast strikes. It’s lightweight and easy to conceal at a retracted length of 7.70”, making it a fine defense option for police officers or the casual user going about their day (or night).

113

at Optics Planet

Prices accurate at time of writing

Prices accurate at time of writing

Opening an ASP baton be a little tricky to master. The manufacturer’s intended method is much faster than trying to pull the tip out of the baton manually, especially when an attacker is charging at you.

This video illustrates the concept:

Practice makes perfect!

Like the Talon Infinity 50cm, this product is available in two models, Steel (16.3 ounces) and Airweight (8.9 ounces).

Agent Infinity Concealable Baton, (Steel) 40cm
Agent Infinity Concealable Baton, (Steel) 40cm

ASP’s Agent Baton series was designed to be a low-profile weapon for investigators and undercover operatives, which means you can safely rely on its fine line grip and striking potential in a pinch.

The Agent Infinity Concealable Baton 40cm is manufactured with a 4140 steel striking surface and weighs in at 13.2 ounces. It retracts down to 7.75” with a push of the cap, and you can easily attach it to your waistband with a scabbard.

150

at ASP

Prices accurate at time of writing

Prices accurate at time of writing

If you need a lighter option, the Airweight model is only 7.3 ounces—less than a pound!

However, this product isn’t quite as reliable as the Friction Loc Baton 21” when it comes to long-term maintenance. The ASP website recommends purchasing its Glide Baton and Cuff Lubricant to keep your Agent Baton in excellent working order.

What’s your take on ASP batons?

Readers’ Ratings

Be the first to rate this!

Your Rating?

2. Smith & Wesson Heat Treated Collapsible Baton

Smith & Wesson (S&W) are best known for their firearms, but guns aren’t the only form of self-defense they offer. This trustworthy brand also produces an affordable alternative to the ASP Tactical Expandable Baton.

The S&W Heat Treated Collapsible Baton is a friction lock baton with a comfortable foam handle. It comes in four sizes: 16”, 21”, 24”, and 26.”

Aluminum tubing combines with steel to make this product lighter than the ASP, though not as durable. It’s probably not the baton of choice for law enforcement or security guards, but it can get the job done for most casual users.

44

at Smith & Wesson

Prices accurate at time of writing

Prices accurate at time of writing

A word of warning: This product comes with a belt sheath, but customers have reported that it’s not very user-friendly, as it can be somewhat tricky to pull the baton out.

3. Monadnock AutoLock Baton Patrol Kit

Monadnock’s AutoLock Baton is pretty much the gold standard for batons.

This compact collapsible model is very comfortable to both hold and carry. It can be purchased with either a foam grip or a fluted rubber “Super” grip, and the kit includes a polycarbonate front draw holster in your choice of plain black or a basket weave pattern.

The patented AutoLock system ensures that the baton stays open no matter how much jabbing you do, and closes with the press of a button located on the Hindi cap.

145

at Optics Planet

Prices accurate at time of writing

Prices accurate at time of writing

Monadnock’s AutoLock Baton is designed with rotating shafts that help prevent an attacker from grabbing the length of the baton and ripping it out of your hand.

Want to know another cool feature? The power safety tip is weighted to add mass to your strikes.

The baton that comes in the kit is 22”, but you can also purchase the baton, holster, and Hindi cap separately. When purchased individually, the baton comes in the following sizes: 16”, 18”, 21”, 22”, and 26”. 

4. Streetwise Barbarian

The Streetwise Barbarian is an all-in-one baton, stun gun and flashlight.

Streetwise Barbarian
Stun ’em! Blind ’em! Block ’em!

Because this model isn’t collapsible, it’s best to keep this 19” bad boy at home or in the car.

The company also manufactures a 14” long mini version, but it’s probably still too big for daily carry unless you’re lugging around a bag or have exceptionally large pockets (we don’t judge).

Both products have three electrical arc contact points for greater contact area, which is more than most stun guns have. Those contact points produce loud, visible sparks to aid with deterrence.

44

at The Home Security Superstore

Prices accurate at time of writing

Prices accurate at time of writing

The full-sized version has a fluted rubber grip, while the Barbarian Mini has a foam grip.

In addition to the power switch, these rechargeable batons promise “triple level safety,” so you can have the stun gun ready to spark without the risk of accidental discharge.

If the stun gun doesn’t do the trick, you can always rely on the spiked top to add some extra oomph to your hits or the rough tip to make your jabs just a little bit more painful.

Need a flashlight? Both Streetwise Barbarian models include 180 lumen LED light with three settings: full strength, half strength, and a blinding strobe – you can never be too safe at night!

Streetwise Barbarian Flashlight
A flashlight is always handy!

The case is made from shockproof military-grade aluminum alloy. It has a wrist strap to aid retention and a metal belt clip.

Want to learn more about stun guns? Check out the 5 Best Stun Guns of 2020.

5. Cold Steel Brooklyn Bats

Cold Steel’s Brooklyn Series is predominately advertised for actual sporting use, so it makes sense that their products look like standard baseball bats.

But considering Cold Steel’s history as a manufacturer of knives, swords, spears, axes, and other weapons, it’s easy to figure out their actual intentions for this product line.

Cold Steel Brooklyn Whopper 38"
Cold Steel Brooklyn Whopper 38″

Since bats are legal pretty much anywhere, this product is a favorite for truckers and people with similar careers who are constantly crossing state lines.  

Cold Steel Brooklyn Bats come in five sizes:

These bats are comparatively affordable and highly durable. Made from polypropylene, a hard polymer, these bats hit hard and are almost impossible to break.

They’re fairly heavy for their size, but they are well weighted for swinging, and the narrow grip, combined with the knob at the end of the handle, helps keep the bat from pulling out of a user’s hands. 

27

at Amazon

Prices accurate at time of writing

Prices accurate at time of writing

The larger sizes aren’t easy to use single-handedly, particularly for smaller people, but most won’t have any problems using the Shorty with one hand.

5. Maglite 6D Cell Flashlight

For something less sporty, how about a Maglite?

Maglite 6D Cell Flashlight
Maglite 6D Cell Flashlight

I keep one by my bed, mostly for power outages and the like, but it’s nice to know it can also be used as a 19” baton.

Within the 6D cell size, you have two options, the Premium version and the Classic version. The Premium version is several times the price of the Classic, but it has a bunch of cool features that are worth the cost.

I recommend going with the Premium version that has a 694 lumen LED light and a 415-meter range.  

You can choose between four functions that have three light settings:

  • General (default): Full Power, Low Power, and Eco (reduced brightness)
  • Outdoor: Full Power, Low Power, and Strobe
  • Law Enforcement: Momentary Brightness (the light comes on as long as the button is depressed), Full Power, and Eco
  • Tactical: Momentary Brightness, Full Power, and Strobe
60
85

at Amazon

Prices accurate at time of writing

Prices accurate at time of writing

The light has a 71-hour battery life when utilizing the Full Power setting. Pretty impressive! You can also extend the battery life by using the Low Power setting (73 hours) or the Eco setting (a whopping 177 hours).

Of course, the more budget-conscious can get the Classic model. At 19.5″ long, it boasts a 178 lumen incandescent bulb with a 338-meter range and a single light setting that delivers an 11-hour battery life.

Both Premium and Classic models are water-resistant and weigh 50 ounces (a little over 3 pounds).

Fun fact—you can adjust the beam from a spotlight to a floodlight by turning the head of the flashlight.

Now, if you just need a normal flashlight because you’re not Conan on a mission, you should check out our review on Best Everyday Carry Flashlights. Or, if you’re in the market for options with a bit of gravity to them, try our post on Best Tactical Flashlights!

Tested Flashlights
Our In-House Tested Tactical Flashlights.

Conclusion

Batons are handy self-defense tools, and any of these products would serve you well.

Armed and Ready
Never leave home without your trusty baton.

However, like any weapon, you need to train with a baton to make sure you can use it effectively. This doesn’t mean swinging it around a few times; you need to make a habit of practicing with your baton to improve your technique and muscle memory.

Still have questions about batons? Have a favorite baton or a tip for buying or using batons? Let us know in the comments. If batons aren’t your thing, but you still want a less-lethal option, check out our guides to the best pepper spray and non-lethal weapons and ammo.

Sabre 3-in-1 Pepper Spray Size Comparison
Sabre 3-in-1 Pepper Spray Size Comparison

The post Best Batons for Self-Defense: The Good, the Bad, & What to Buy appeared first on Pew Pew Tactical.

guns

via Pew Pew Tactical https://ift.tt/2m7cc0U

July 6, 2020 at 05:41PM

The Ultimate Guide to mysqldump

The Ultimate Guide to mysqldump

https://ift.tt/38BF0bN


Introduction

All complex applications require a database of some sort to store information.
MySQL is one of the most popular databases that is used on the web. Most of a businesses
time and value is put into a database and its key to keep that data secure. SnapShooter uses
MySQL to help manage and backup customers servers and databases.

In this guide we will explore the mysqldump utility in depth. We cover the ways
you can make a backup as well as the common errors users experience when using it.

Table of Contents

What is mysqldump?

MySQL is an open-source and one of the most widely used relational database
management system. It is used to store anything from a simple name to a picture gallery or a
large amount of information in a network. mysqldump is a part of the MySQL
relational
database package that is used to dump (backup) a database or a collection of databases into
a simple text file. The text file is a set of SQL statements that are used to reconstruct
the database to its original state.

Generally, mysqldump is used to export the database to a backup file (like we
do at SnapShooter) and also
used to move the database to the other host. The mysqldump command also generates output in
XML, CSV and other delimited text formats.

Basic How to use MySQL Dump

The basic syntax of Mysqldump command is shown below:

mysqldump -u USERNAME -pPASSWORD DBNAME > DBBACKUP.sql
mysqldump -u USERNAME -pPASSWORD --databases DB1 DB2 DB3.. >DBBACKUP.sql
mysqldump -u USERNAME -pPASSWORD --all-databases > ALLDBBACKUP.sql

A brief explanation of each option is shown below:

-u It specifies your MySQL username.
-p It specifies your MySQL password.
DBNAME A name of the database that you want to backup.
DBBACKUP.sql The name of the backup file you want to generate.
-h It specifies the hostname of the MySQL database server.
–databases It is used to determine the database.
-all-databases It is used to backup all databases.
–default-auth=plugin It is used to specify the client-side authentication plugin to
use.
–compress It is used to enable compression in server/client protocol.
-P It is used to specify the port number to use for MySQL
connection.
How to Backup Single MySQL Database

The simple and easiest way to take a backup of a single database, run the following command:

mysqldump -u root -ppassword wpdb > wpdb_backup.sql

This command will dump the database named wpdb and generate a single file named
wpdb_backup.sql.

How to Backup Multiple MySQL Databases

With mysqldump, you can also take a backup of multiple databases to a single file.

For example, dump the database named wpdb1, wpdb2 and wpdb3 and generate a single backup
file
named wpdb_backup3.sql, run the following command:

 mysqldump -u root -ppassword --databases wpdb1 wpdb2 wpdb3 > wpdb_backup3.sql
How to Backup All MySQL Databases

Mysqldump also allows you to backup all databases in your system.

For example, take a backup of all databases and generate a single backup file
named
alldb_backup.sql, run the following command:

mysqldump -u root -ppassword --all-databases > alldb_backup.sql
How to Backup Only Structure MySQL Databases

If you want to generate the backup of the database structure, then you must use
the –no-data
option in the mysqldump command.

For example, it generates the backup of the database structure of the wpdb
database run the
following command:

mysqldump -u root -ppassword --no-data wpdb > wpdb_backup.sql
How to Backup single MySQL table

If you want to generate the backup of the specific table, you will need to
specify the table
name after the database name.

For example, generate the backup of the wptable table of the wpdb database, run
the following
command:

mysqldump -u root -ppassword --no-data wpdb wptable > wpdbtable_backup.sql
How to Backup MySQL with no structure

If you want to generate the backup of the data without the database structure,
then you must use
the –no-create-info option in the mysqldump command.

For example, generates the backup of data of the wpdb database, run the
following command:

mysqldump -u root -ppassword wpdb --no-create-info > wpdb_backup.sql

Basic How to Import a mysqldump

The simple and easiest way to import the database using the following command:

mysql -u root -ppassword wpdb < wpdb_backup.sql

Note: You will need to create an empty database on the target machine before
importing database.

You can also import the database with mysqlimport command if you want to
restore a database that already exists on the targeted machine.

mysqlimport -u root -ppassword wpdb < wpdb_backup.sql

If you want to import all databases, run the following command:

mysql -u root -ppassword < alldb_backup.sql

MySQLDump what does the –quick flag do?

mysqldump works by retrieving and dumping table contents row by row or
retrieving the entire
content from a table and buffer it in memory before dumping it. This will cause a problem if
you
are exporting large tables.

Use mysqldump command with –quick flag reads out large tables in a way that doesn’t require
large amounts RAM to fit the full table in memory. This will provides extra safety for
systems
with little RAM and large databases.

Can you use Where clause with MySQLDump?

Of course, it’s easy to use a where clause with mysqldump command. If you have a
database with lots of tables and each table has a billion records, and if you want the
records for a specific year, then you can use where clause with mysqldump command. Where
clause allows you to pass a string for the condition and fetch the specific records as you
need.

For example, fetch all records from the table named mytable and database named
wpdb where the field date_created is greater than ‘2018-02-01’, run the following command:

mysqldump -u root -ppassword wpdb --tables mytable --where="date_created > '2018-02-01' " > wpdb_myrecord.sql

mysqldump Common Errors and Fixes

mysqldump: error 2013: lost connection to mysql
server during query when dumping table?

You should increase the max_allowed_packet, net_write_timeout, net_read_timeout
and innodb_buffer_pool_size value to appropriate levels to fix the error.

To set the above value, edit the MySQL configuration file :

nano /etc/mysql/my.cnf

Add the following lines under the [mysqld] and [mysqldump] section:

[mysqld]
innodb_buffer_pool_size=100M
max_allowed_packet=1024M

[mysqldump]
max_allowed_packet=1024M
net_read_timeout=3600
net_write_timeout=3600

Save and close the file when you are finished. Then, restart the MySQL service to effect the
changes.

service mysql restart

Or

systemctl restart mysqld

mysqldump: error 2020: got packet bigger than ‘max_allowed_packet’ bytes when dumping table?

When the database you are trying to backup is very large, and the
max_allowed_packet value was set to a low value. This will cause the above error.

You can fix the error by editing the MySQL configuration file:

nano /etc/mysql/my.cnf

Increase the max_allowed_packet value the under the [mysqld] and [mysqldump]
section

[mysqld]
max_allowed_packet=your-desired-value

[mysqldump]
max_allowed_packet=your-desired-value

Save and close the file when you are finished. Then, restart the MySQL service to effect the
changes.

service mysql restart

Or

systemctl restart mysqld

mysqldump when using lock tables?

By default, mysqldump command will perform a lock on all tables until the
backup is complete. But this is a poor option in a live environment where the database is
extensive, and uptime is necessary.

Primarily it’s used for protection of data integrity when dumping MyISAM tables. MyISAM
tables
require this locking because they don’t support transactions.
If you use a mix of MyISAM and InnoDB tables, then dump your MyISAM tables separately from
InnoDB tables using --lock-tables option.

InnoDB is the default table storage engine nowadays. So you can skip the lock
tables option by
using --skip-lock-tables to stop the behaviour and
--single-transaction to run mysqldump within
a transaction.

Couldn’t execute ‘show create table x’ Table
does not exist (1146)

Some times the table was deleted during the backup process. In that case, you can restrict
certain tables from the mysqldump command using the –ignore-table option.

You will need to specify both database and table names as shown below:

mysqldump -u root -ppassword dbname --ignore-table=tablename > db_backup.sql

You can also ignore the multiple tables by specifying the option per table as
shown below:

mysqldump -u root -ppassword dbname --ignore-table=table1 --ignore-table=table2 > db_backup.sql

mysqldump unknown database when selecting the
database

Usually, this error occurs when you specify the password on the command line with -p flag
and there is a space between -p and password.

For example, if you want to dump the database named wpdb using the user “root”
and password “your-password”, and use the following command:

The above command will produce an error says ""Unknown database your-password" when selecting the database".

Actually, you must specify the password with no space after -p switch as shown
below:

mysqldump -u root -pyour-password wpdb > wpdb_backup.sql

mysqldump got error 1044 when selecting the
database

You will get this error if you are trying to dump the database with the user which has not
enough privileges to access the selected database.

To fix this error, assign proper privileges to the user to access the database.

First, login to MySQL with the following command:

mysql -u root -p

Provide your MySQL root password then grant all privileges on the database to
your user:

GRANT ALL PRIVILEGES ON wpdb.* TO 'your_user'@'localhost';

Next, flush the privileges and exit from the MySQL with the following
command:

FLUSH PRIVILEGES;
EXIT;

mysqldump access denied for user when trying to
connect

There are several reasons for this error. Most common reasons for this error are
listed below:

1. Wrong mysqldump Command

One of the common reasons for this error is that when you use the wrong format
of mysqldump command.

For example, the general syntax for taking database backup using mysqldump is shown below:

mysqldump -u user -ppasword database > database.sql

You will get the above error if you take a database backup without specifying a username and
password as shown below:

mysqldump database > database.sql

You should get the following error:

mysqldump: Got error: 1045: "Access denied for user 'user' @ 'localhost' (using password: NO)" when trying to connect

2. Wrong user credentials

You will also get the above error if you use the wrong username and password
while connecting to
the database. Therefore, MySQL can’t verify the authenticity of the account and throws this
error.

3. Remote host does not allowed to connect to database

You will also see this error if you are trying to backup the database on the
remote server.
Because, remote host disallow external connections and they only allow to connect from the
localhost.

To fix this, configure your MySQL server to allow connections from the remote
host.

How to mysqldump backup large database

Some useful tips and tricks while using the mysqldump for a very large database.

1. How to Compress mysqldump Output

It is a good idea to compress the database backup in gzip format to reduce the
size of the
database.

Run the following command to dump the database named wpdb and gzip it at the
same time:

 mysqldump -u root -ppassword wpdb | gzip > wpdb_backup.sql.gz

If you want to restore the compressed database, run the following command:

gunzip < wpdb_backup.sql.gz | mysql -u root -ppassword wpdb

2. How to import the large MySQL database

First, login to the MySQL shell using the following command:

mysql -u root -p

Provide your MySQL root password then set network buffer length to a large byte
number as shown
below:

set global net_buffer_length=1000000;

Next also set maximum allowed packet size to a large byte number as shown
below:

set global max_allowed_packet=1000000000;

Next, disable foreign key checking to avoid delays, errors and unwanted
behaviour as shown
below:

SET foreign_key_checks = 0;
SET UNIQUE_CHECKS = 0;
SET AUTOCOMMIT = 0;

Next, import your dump file with the following command:

source /backup-path/wpdb.sql

Once you are done, enable foreign key checks with the following command:

SET foreign_key_checks = 1;
SET UNIQUE_CHECKS = 1;
SET AUTOCOMMIT = 1;

3. Separate databases into separate data files

If you have a large database, then you can also split them by separate into
separate data files.

You can create a new file with a list of all databases using the following
command:

mysql -u root -ppassword -A --skip-column-names -e"SELECT schema_name FROM
information_schema.schemata WHERE schema_name NOT IN ('information_schema','mysql')" >
db_list.txt

Once you have the list of databases, you can run a loop with mysqldump command
through the list
as shown below:

for DB in `cat db_list.txt`
do
mysqldump -u root -ppassword --hex-blob --routines --triggers ${DB} | gzip > ${DB}.sql.gz &
done
wait

Mysqldump without password

When you dump a database with mysqldump, you will need to specify a username and
password with the command. If you don’t want to specify a username and password with
mysqldump command every time, you just need to create a file in your home directory with
MySQL credential. This will disable the mysqldump password prompting.

To do so, create a new file in your home directory:

nano ~/mysql.txt

Add your MySQL root credential, as shown below:

[mysqldump]
user=root
password=password

Save and close the file when you are finished.

Now, you can specify your MySQL credential file using the option –defaults-file
as shown below:

mysqldump --defaults-file=~/mysql.txt wpdb > wpdb_backup.sql

programming

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

July 5, 2020 at 10:24PM