Akaunting – Free Accounting Software Powered by Laravel



Laravel Applications
/
October 04, 2018

Akaunting – Free Accounting Software Powered by Laravel

Akaunting is a free and open source accounting software built on Laravel. It handles everything from invoicing to expense tracking to accounting and runs on your infrastructure.

What makes Akaunting unique in the accounting software space is it’s not a SaaS app, you download it and run it on the server setup of your choice. This gives you full control over all your financial data and keeps you from having to share it, like many of the other big name accounting software.

Akaunting is completely free to use and it’s open source, and they make money by selling additional features through their app store. Some of these include estimates, 2Checkout, open cart, and plenty more.

For more details check out the Akaunting site and Github repo.


via Laravel News
Akaunting – Free Accounting Software Powered by Laravel

A Smart Design for Sturdy Space-Saving Sawhorses

Industrial Design 101: From a UX perspective, you want useful things to be around when you need them, and to disappear when you don’t need them. Occasional-use items that are bulky ought be designed to fold up or break down. The plastic folding sawhorses in my shop are among the most useful items in there.

I wouldn’t have paid for them, however; they were given to me as a gift. Sawhorses are basic enough that you should always DIY rather than buy. You can make a simple pair of folding sawhorses with butt hinges, but if you don’t have any handy, J.G. Dean’s breakdown design is the way to go. His sawhorses are cheap, useful, quick to build and take up a minimum of space.

"I can’t claim to have originated this design for sawhorses," Dean writes in his Instructable. "I’ve seen similar ones in workshops and on construction sites for many years, but I believe I’ve made some improvements in their construction and an modification/addition that makes them more useful."

These sawhorses are made of inexpensive 2×4 construction grade lumber except for some scrap plywood, and some screws. They set up and knock down quickly and easily to take up a minimum of space, and provide almost as much support for sheet goods as a large work table. 

The entire system can easily be built with a table saw in under an hour for about $30 once the cutting jig is made out of some scrap wood. I based all the dimensions here on sawhorses that are 30" tall and 48" wide, which are both taller and wider than most commercial sawhorses. 

Since the top edges of the cross pieces are often cut into during use, I’ve found that it’s better to make them easily replaceable.With these, the top surfaces of both sawhorses can be replaced in minutes for generally about $5-6.

Check out Dean’s full Instructable here.


via Core77
A Smart Design for Sturdy Space-Saving Sawhorses

Master-Slave Replication with MySQL 8.0 in 2 mins

There are multiple way to setup replication with MySQL 8.0 and our replication offer as never been so rich: asynchronous, semi-synchronous, group replication, multi-source, … and much more options !

But if you want to setup a very quick Master-Slave environment from scratch for a quick test (you can always use dbdeployer), here are some commands to make it right the first time 😉

Requirements

You need to have MySQL 8.0 installed and running on both servers and with the same initial data (a fresh install for example). Here we use mysql1 and mysql2. We will also use GTID as it’s much more convenient.

Servers Configuration

Let’s setup mysql1 first:

mysql1> SET PERSIST server_id=1; 
mysql1> SET PERSIST_ONLY gtid_mode=ON; 
mysql1> SET PERSIST_ONLY enforce_gtid_consistency=true; 
mysql1> RESTART;

And now mysql2:

mysql2> SET PERSIST server_id=2; 
mysql2> SET PERSIST_ONLY gtid_mode=ON; 
mysql2> SET PERSIST_ONLY enforce_gtid_consistency=true; 
mysql2> RESTART;

Replication User

On mysql1 that will act as master we do:

mysql1> CREATE USER 'repl'@'%' IDENTIFIED BY 'password' REQUIRE SSL; 
mysql1> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%';

Starting the Slave

And on mysql2, we just configure and start replication:

mysql2> CHANGE MASTER TO MASTER_HOST='mysql1', 
        MASTER_PORT=3306, MASTER_USER='repl', 
        MASTER_PASSWORD='password', MASTER_AUTO_POSITION=1, MASTER_SSL=1;
mysql2> START SLAVE;

Done !

Very easy, and of course don’t forget to check the manual for much more options !

via Planet MySQL
Master-Slave Replication with MySQL 8.0 in 2 mins

MIT, Google, Cisco and USPTO create Prior Art Archive for better patents

The patent system is broken — there are too many ways to list here, really. The problems surrounding prior art are certainly among them, and a team of high profile companies and organizations are joining forces to address some of the these with the Prior Art Archive.

The database is a collaboration between MIT’s Media Lab, Google, Cisco and the United States Patent and Trademark Office, which certainly has the most to gain here. Using the MIT-hosted archive, patent applicants can find easily accessible examples of prior art and other technical information for reference.

“The patent examination process should stop patents from being issued on old or obvious technology,” MIT writes. “Unfortunately, just because technology is old doesn’t mean it is easy for a patent examiner to find. Particularly in the computer field, much prior art is in the form of old manuals, documentation, web sites, etc. that have, until now, not been readily searchable.”

Google also has a blog post detailing its own work with the archive, which mostly revolves around search. The company is also implementing AI and ML technologies to help bolster searches. “To this end,” the company writes, “we’ve recently created an open ecosystem, the Google Patents Public Datasets, to make large datasets available for empirical public policy, economics, and machine learning research.”


via TechCrunch
MIT, Google, Cisco and USPTO create Prior Art Archive for better patents

Excel Export for Laravel Nova



News
/
October 02, 2018

Excel Export for Laravel Nova

A common feature request from clients is the ability to export data to Excel, so they can create their own reports and a myriad of other things. Maatwebsite, the creators of Laravel Excel, recently launched a new Nova package named Laravel Nova Excel for just this purpose.

Integrating it with your Nova is really simple. First, require the package:

composer require maatwebsite/laravel-nova-excel

Next, go to a Nova resource. As an example app/Nova/User.php. Add Maatwebsite\LaravelNovaExcel\Actions\DownloadExcel action to your actions() list.

<?php

namespace App\Nova;

use Illuminate\Http\Request;
use Maatwebsite\LaravelNovaExcel\Actions\DownloadExcel;

class User extends Resource
{
    /**
     * The model the resource corresponds to.
     *
     * @var string
     */
    public static $model = 'App\\User';

    // Other default resource methods

    /**
     * Get the actions available for the resource.
     *
     * @param  \Illuminate\Http\Request $request
     *
     * @return array
     */
    public function actions(Request $request)
    {
        return [
            new DownloadExcel(),
        ];
    }
}

After this, you’ll get the ability to export all the Users to an Excel file. Of course, this is just the minor highlights of the package and it can do many other things. Check out their getting started guide for full details on everything you might need.


via Laravel News
Excel Export for Laravel Nova

Databases and Migrations


Let’s move on to the fun part: connecting to our database. This lesson will introduce a number of new concepts, so pay close attention. We’ll first review environment files. This is where we can store important keys, passwords, and configuration settings. Next, we’ll discuss Laravel migrations: what they are, and why you should use them.


via Laracasts
Databases and Migrations

How to Stay Out of Prison When Building a Rifle at Home ~ VIDEO & Check Lists


Opinion by Alex Kincaid

USA – -(AmmoLand.com)- There’s only one thing better than buying a new gun:  Making your own custom firearm at home.

Stick to Alex Kincaid’s “Three Rules for Staying Out of Prison” below, and you stand a good chance of not violating one of the many gun-control laws that can affect well-intentioned, law-abiding Americans.

What are the three rules?

  1. Be Selfish:  Build firearms for your personal use
  2. Know what you’re buying
  3. Know what you’re making

Build for Your Personal Use

The ATF has published an opinion that “Firearms may be lawfully made by persons who do not hold a manufacturer’s license under the Gun Control Act provided they are not for sale or distribution and the maker is not prohibited from receiving or possessing firearms.”

If you start helping other people finish their firearms and, especially, if you take money from them for doing so, you can wind up accused, prosecuted, and convicted of violating the federal Gun Control Act.

On top of it, if you purchase an 80% lower, and pay someone to finish it, the ATF has now said that the person finishing the lower into a firearm must have a federal firearms license to do so.

The safest route to ensure that you are not violating federal (and sometimes, state) law is to only build firearms for your own, personal use. If a friend or family member would like your guidance as they build their own rifle, instruct and assist them as they complete the task, rather than do it for them.

Know What You’re Buying

Just because something is for sale, doesn’t mean it’s legal. Think about drugs or child porn. These items are easily found and bought, but they are not legal. The same goes for firearms parts that you might find on the internet. Some parts, by themselves, may be legal, but depending on how you install them, they may make a firearm illegal.

If you buy a foregrip, is it angled, vertical, or unknown? Our laws distinguish between these different parts, and you can easily violate the federal law known as the National Firearms Act by installing certain parts on an AR-style pistol and turning it into an “any other weapon” or “AOW.”

To make matters worse, if you lawfully purchase parts for your AR rifle and install them in certain states, you may have turned a legal rifle into an illegal “assault weapon” under your state’s laws[read New Jersey], just by adding cosmetic parts. Gun control laws don’t usually make much sense, and these “cosmetic feature” laws are an excellent example of how little sense gun control laws can make. Gun owners know that a flash suppressor, a foregrip, a collapsible stock, and other parts of a rifle don’t make the rifle more deadly, but more states continue to pass “assault weapon” bans, which make adding these parts to a rifle illegal.

So, know what you’re buying and whether the parts are legal in your state.

Know What You’re Making

Basic AR 15 Rifle Kit Gun Parts
Basic AR 15 Rifle Kit Gun Parts

Do you know if the gun parts and pieces you will be assembling will create a pistol, a rifle, or short-barreled rifle (SBR)?

You need to know the rules before you start your build. Buying a lower receiver is like buying a blank slate. Technically, your lower receiver is your firearm, but before you add parts to it, it is a generic firearm. If you create an SBR by registering your rifle in the NFRTR, you cannot go backwards and turn that same lower receiver into a pistol without processing additional paperwork.

If you create a firearm designed to shoot from your shoulder, you have usually created a rifle. If you create a firearm designed to shoot with one hand, you have usually built a pistol. You can easily turn a pistol into an AOW by adding a vertical foregrip, as stated above.  In some states, if you add certain cosmetic features, you may turn a legal rifle into an illegal “assault weapon.”

If you add a shoulder stock and a barrel that is under 16” in length, you are building an SBR, and you had better pay the $200 tax, put your name on the registry, notify your chief law enforcement officer, send in photographs and fingerprints, and wait 6-9 months to get your approved tax stamp before building this firearm.  If you don’t, you are violating federal law.

If you’re building an NFA firearm – make sure you download a free copy of Alex Kincaids Form 1 Guide.  This guide will walk you through filling out Form 1 with your gun trust name.

Please watch our YouTube channel to hear more about how to build a rifle and stay out of prison. We also recommend a few detailed videos showing you how to insert small part into small part during your build. We like to shop at Brownell’s, where you can watch more how-to build videos on Brownell’s website.

To help you get started on your build journey, click here to check out Brownell’s build list for free. This build list will help you make sure you purchase the essential parts to a non-sporting rifle. It’s essentially a shopping list for your non-sporting rifle build. If you intend to build a firearm that will be subject to the National Firearms Act, be sure to contact us for a gun trust and also, download Alex Kincaids Form 1 Guide for free, which will walk you through the steps of using your gun trust to get your tax stamp for your new NFA firearm.

Assembling An AR-15 Rifle Parts Checklist

Feel free to post pictures of your build in the comments below! We would love to see what other good Americans are up to!  If you have questions, please call us for a free consultation.


Alexandria Kincaid, Attorney
Alexandria Kincaid, Attorney

About Alexandria Kincaid:

Alexandria Kincaid is a former elected District Attorney and the founder of Alex Kincaid Law, a full-service, boutique law firm emphasizing constitutional, criminal, and asset protection (estate and business) law, and boasting the unique specialty of firearms law. Alex Kincaid is hailed the Second Amendment Guru by the American Shooting Journal. Her expertise of the gun laws is relied upon by gun owners, gun businesses, and gun rights organizations across America, and her clients also include well-known firearms and firearms accessories manufacturers. Alex is also the author of “Infringed” the ultimate gun law book, available on Amazon . Or visit www.alexkincaid.com


via AmmoLand.com
How to Stay Out of Prison When Building a Rifle at Home ~ VIDEO & Check Lists

Prepared Statements for MySQL: PDO, MySQLi, and X DevAPI

Recently I ran across a prominent PHP Developer who incorrectly claimed that only PDO allows binding values to variables for prepared statements.  A lot of developer use prepared statements to reduce the potential of SQL Injection and it is a good first step.  But there are some features that you do no kno

What is a Prepared Statement?

The MySQL Manual states The MySQL database supports prepared statements. A prepared statement or a parameterized statement is used to execute the same statement repeatedly with high efficiency.

So far, so good. Well there is also a performance issue to consider too.  From the same source The prepared statement execution consists of two stages: prepare and execute. At the prepare stage a statement template is sent to the database server. The server performs a syntax check and initializes server internal resources for later use.

So it is a two step process.  Set up the query as a template and then plug in the value. If you need to reuse the query, just plug in a new value into the template.

So lets look at how it is done.

PDO

On PHP.NET, there are a lot of really great examples. 

/* Prepared statement, stage 1: prepare */if (!($stmt = $mysqli>prepare("INSERT INTO test(id) VALUES (?)"))) { echo "Prepare failed: (" . $mysqli>errno . ") " . $mysqli>error;
}

So this is our template with a ‘place holder’, designated as a question mark (?).
And then it is executed.

$id = 1;if (!$stmt>bind_param("i", $id)) { echo "Binding parameters failed: (" . $stmt>errno . ") " . $stmt>error;} if (!$stmt>execute()) { echo "Execute failed: (" . $stmt>errno . ") " . $stmt>error;}?>

So if we wanted to insert an $id with a value of 2, we would just assign that value ($id = 2)
and rerun the $stmt->bind_param/$stmt_execute duo again.

So that is the basics. But what do they look like with the other two extensions?

MySQLi


So what does the MySQLi version look like? Once again question marks are used as placeholders.

$stmt $mysqli->prepare("INSERT INTO CountryLanguage VALUES (?, ?, ?, ?)");

$stmt->bind_param(‘sssd’$code$language$official$percent);
$code ‘DEU’;$language ‘Bavarian’;$official "F";$percent 11.2;
/* execute prepared statement */$stmt->execute();
printf("%d Row inserted.\n"$stmt->affected_rows);

But what is that sssd stuff?  That is where you declare the type of variable you are want to use.  Use ‘s’ for string, ‘i’ for integer, ‘d’ for double, and ‘b’ for a blob (binary large object).  So you get the advantage of type checking.

X DevAPI

The much newer X DevAPI is for the new X Protocol and the MySQL Document Store.  Unlike the other two examples it is not Structured Query Language (SQL) based.

$res $coll->modify(‘name like :name’)->arrayInsert(‘job[0]’‘Calciatore’)->bind([‘name’ => ‘ENTITY’])->execute();

$res $table->delete()->orderby(‘age desc’)->where(‘age < 20 and age > 12 and name != :name’)->bind([‘name’ => ‘Tierney’])->limit(2)->execute();

Note that this is not an object relational mapper as it is the protocol itself and not something mapping the object to the SQL.

Wrap Up

So now you know how to use prepared statements with all three PHP MySQL Extensions.

via Planet MySQL
Prepared Statements for MySQL: PDO, MySQLi, and X DevAPI

Cop Pulls Tesla Model 3 Driver Over For ‘Computer’ Mounted On Dashboard


Photo: Kristen Lee / Jalopnik

We’ve spoken at length about the merits and disadvantages of the super minimal interior in the Tesla Model 3, which focuses all of the car’s information and controls on a single touchscreen. It’s hard to believe the system is road legal, and it’s something one unlucky owner caught on video trying to explain to the cops.

In the video above via InsideEVs, recorded on Sept. 29, Tesla Model 3 owner Jon Hall was pulled over and questioned about the giant laptop-like touchscreen seemingly tacked onto his dashboard.

When the officer first walked up, it seemed like Hall thought the cop was joking when told he was “not allowed to have your computer mounted on there,” before quickly realizing the cop serious.

To be fair, the Model 3’s screen is strikingly large, and since it’s the only prominent feature on the dashboard, it does stick out and draw attention to itself. Describing it as a computer tacked on isn’t exactly wrong.

Photo: Kristen Lee / Jalopnik

After Hall explained that the screen came stock with the car and showed the officer how the touchscreen controlled most of the car’s functions, the officer apologized, maybe a little embarrassed at his lack of tech savviness, and let Hall go.

But it’s still an interesting interaction for a few reasons. Screens are getting bigger and bolder in cars and the Model 3 isn’t exactly a huge departure from that trend. And these things are probably only going to get a lot crazier as technology progresses, like the proposed screen on the upcoming Byton crossover that stretches from one door to the other inside.

It’s definitely going to take some adjusting to—as a society, apparently. At least this cop didn’t pull a gun over his Tesla confusion.


via Gizmodo
Cop Pulls Tesla Model 3 Driver Over For ‘Computer’ Mounted On Dashboard

Ruger No. 1 450 Bushmaster Single-Shot Rifle – Review


Ruger No. 1 Single-Shot .450 Bushmaster Rifle - Review
Ruger No. 1 Single-Shot .450 Bushmaster Rifle – Review

Grand Rapids, MI USA -(Ammoland.com)- In this fifth installment of my .450 Bushmaster series, I will be taking a look at a very interesting departure from what many think a .450 BM rifle to be: the Ruger No. 1. What makes this rifle special and different from other .450 offerings on the market today? Well, for starters it is a single-shot.

There has been a race for capacity when it comes to rifles these days. It is no surprise that this has lead to problems with many rifles, especially those in .450 Bushmaster. As I described in my previous articles, there are many significant problems associated with magazine-fed semiautomatics, mostly stemming from said magazines. Problems in reliability can shake a hunter’s confidence in his rifle, and I know a great many of frustrated .450 owners who lament that their ideal hunting cartridge won’t cycle in their ideal hunting rifle.

The simplicity of the single-shot rifle is hard to ignore in the context of hunting. Americans have a long and romanticized history with single-shots, going back to the Civil War era, which saw the widespread acceptance of the Sharps rifle and other big-bores. As we manifested our destiny and headed west, the large single-shot became a staple of the buffalo hunter and cavalryman alike. Our story has been intricately linked to the single-shot, but the technology simply marched past it and only the most famous survived.

Ruger’s No. 1 is a falling block action like the Sharps, but it is of fully modern design and constructed of modern materials.
Ruger’s No. 1 is a falling block action like the Sharps, but it is of fully modern design and constructed of modern materials.

Ruger’s No. 1 is a falling block action like the Sharps, but it is of fully modern design and constructed of modern materials. The strength of the No. 1 action is such that it can chamber some of the most powerful hunting cartridges ever made. The .450 is not among those in that upper class of powerful cartridges, but it is a contender for this year’s most relevant. As I’ve already written, the .450 is gaining popularity because it is the most powerful commonly available cartridge that fits not only our favorite rifles, but also into state hunting law in Michigan, Ohio, Indiana, Iowa, and possibly more due to its straight case walls.

Simply open the lever and lower the block, insert a cartridge, and close it.
Simply open the lever and lower the block, insert a cartridge, and close it.

The choice to make a No. 1 was entirely logical on Ruger’s part. There is a group of discerning customers that demand something different, not just effective. The .450 has traditionally been an AR cartridge, but today it widely used in bolt actions as well. There are not that many single-shots out there that chamber the .450, as it is a problematic cartridge when it comes to headspace. Unlike many other single-shot cartridges out there, like the .45-70, the .450 has no exterior rim on the case head, in fact, it has a rebated rim. This means that the .450 is less than ideal for use in a single-shot.

Ruger must’ve missed that memo and instead went ahead with making the rifle not only extremely reliable, but also exceptionally easy to use. The operation is simple, with the only moving part in the action being the block. Simply open the lever and lower the block, insert a cartridge, and close it. After firing, lowering the block allows the case to eject straight back. It quite literally shoots straight out and clear of the action. Many single-shots have an extractor, but not an ejector meaning that the case stays in the action, but are just slightly moved out of the chamber.

Ruger includes a set of 1” rings that mount directly to their proprietary base attached to the rifle.
Ruger includes a set of 1” rings that mount directly to their proprietary base attached to the rifle.

The rifle features a 20” barrel, but it has a short 36” overall length. The compact No.1 action allows about 4” more barrel than a typical AR while being shorter overall. Interestingly, Ruger chose to not include iron sights with the rifle. I do lament this, but most people will ultimately end up using a scope anyways. I opted for a simple, fixed 4x Bushnell to approximate what a deer hunter may use in the woods. Ruger includes a set of 1” rings that mount directly to their proprietary base attached to the rifle.

Firing the rifle was quite a bit different than when shooting with an AR. The trigger is light but crisp, allowing great precision. I was surprised at how easy and fast the gun was to reload. I am far more used to Sharps and other hammer-fired single-shots that have a multi-stage loading and cocking process and the simple speed of the No. 1 was noticeable. While not as fast as a bolt action, the rifle could be reloaded in just about a second if a spare round is handy. I would recommend a stock sleeve that has loops for spare cartridges.

Another comfort feature is the muzzle brake.
Another comfort feature is the muzzle brake.

The stock is very comfortable and is made of an attractive grey laminate that nicely compliments the stainless steel of the barrel and action. The stock is fixed and does not feature butt spacers. Another comfort feature is the muzzle brake. I picked up a bit of speed over my 16” Brownell’s AR rifle due to the fact that the gun has no gas system and a longer barrel.

I tested the same four loads as my prior articles from Hornady and Buffalo Bore over my Oehler 35P chronograph. Accuracy is an average if 3, 5-shot groups at 100 yards.

Buffalo Bore 250gr JHP—————————————————————————– 2259fps, 2.9”
Buffalo Bore 275gr XPB—————————————————————————– 2005fps, 1.5”
Buffalo Bore 300gr JHP—————————————————————————— 1967fps, 2.7”
Hornady 250gr FTX———————————————————————————– 2197fps, 1.25”
Hornady 250gr FTX BLACK————————————————————————–2203fps, 1.25”

I came away with the impression that this is a solid, working rifle for a serious, no-excuses hunter. The gun is exceptionally rugged, was supremely reliable, and very accurate. If you want to turn some heads at the range, this will certainly be your ticket to do so.

You can see more of the No.1 .450 Bushmaster at www.ruger.com. Ammunition used in this article can be viewed at www.buffalobore.com and www.hornady.com.


About Josh WaynerJosh Wayner

Josh Wayner has been writing in the gun industry for five years. He is an active competition shooter with 14 medals from Camp Perry. In addition to firearms-related work, Josh enjoys working with animals and researching conservation projects in his home state of Michigan.


via AmmoLand.com
Ruger No. 1 450 Bushmaster Single-Shot Rifle – Review