In this post, you’ll learn how to deploy your Laravel website to production for free with Heroku. The steps are very simple and straight forward so let’s get started.
Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. Everything from the server instance, database, caching, monitoring, and all of those features will be handled by Heroku so the developer can focus on developing the website.
1 – Register an Account
In order to get started with Heroku, you will have to
Upon pressing the “create new app” button you will have to provide the necessary details. Fill in the app name, and the region which is closer to you, and finally define the pipeline like below.
Now that the application has been created you will see the dashboard page which contains the details of the application. You can have a look through it but let’s focus on the “deployment method” first.
For this example, a new Laravel 8 project will be created and the only addition that you have to add is “Procfile” which is a configuration that’s necessary to instruct Heroku build. Do note that the file name itself is “Procfile” with no extension and it has to be saved in the project root.
3 – Connect With the Deployment Provider The provider is the place where the application source code is hosted and how this works is that every time a new update is made to the application and it’s pushed (“git push”) to GitHub or any other online repository, Heroku will get notified and perform its build process and then deploy the application to production. By default, Heroku has 3 providers and they are the:
Heroku Git
GitHub
Container Registry
In this post, the “Github” method will be used so it’s necessary to “Connect to Github” to provide Heroku access to the repository.
Do note that by default the branch that will be used is the “main” branch and from the settings like on the screenshot below, you can “enable automatic deploys” for a faster push to deployment.
Before deploying the branch, the environment configuration has to be set up from the “Settings” tab. You can reveal the “config vars” but by default will be empty.
Fill in the necessary config variable as the “key” and “value” pair a line at a time. The least necessary config to have is the APP_DEBUG, APP_ENV and APP_KEY.
By now it should be ready to be deployed to production so head back to the “deploy” tab.
5 – Trigger the Manually Deploy Button
From the “manual deploy” section, press the “deploy branch” and let the build process run, it will take few seconds and once it’s ready, you can view it from the link provided or just click the “view” button.
Finally, you can preview the application in production and it should look like below. If you have come across any errors, do enable the APP_DEBUG to “true” and APP_ENV to “local”, this way the errors will appear when you access the link.
This URL is fully accessible to the public but do note that if your website doesn’t receive any traffic within 30 mins then the instance/heroku will be in a sleep/hibernate mode so it will take few seconds for the website to load.
By now you should be able to deploy your Laravel app to production with Heroku for free and in the next tutorial, you’ll learn how to set up a database on Heroku. If you found this tutorial to be helpful do share it with your friends, cheers and happy coding 🍻
If you’re one of the thousands of gamers plagued by Joy-Con drift—an issue where the analog sticks on the Nintendo Switch’s controllers register movements even when they’re not being touched—and are frustrated that Nintendo still hasn’t come up with a permanent solution, the fix could be as simple as a tiny millimeter-thick piece of paper.
It’s been four years since the Switch was first released and even units purchased over the past year have started developing the issue known as Joy-Con drift. It’s uncertain why Nintendo hasn’t identified the source of the problem and permanently fixed the hardware (many who’ve sent Joy-Cons to Nintendo for repair report the drifting issue returning months later) but the company is now facing multiple class-action lawsuits around the world as a result of the persistent issue.
There are several theories as to why Joy-Con drift happens, but the most common is that dust and dirt can get into the joystick mechanism, build up, and prevent small metal contacts from touching graphite pads that register the movements of the analog stick. Opening the Joy-Cons and cleaning these contacts remedies the drift, as does occasionally just blasting compressed air into the controller, but the fixes are usually only temporary, and most of the time the Joy-Con drift returns.
That’s what ‘Victorstk’ of the YouTube channel ‘VK’s Channel’ found, so they decided to dig deeper, watching endless videos of both Joy-Con repairs and cleanings, but also videos of the joysticks used on other devices like the portable PSP and PS Vita being repaired. They eventually determined a second issue responsible for Joy-Con drift: over time the metal clamps that hold all of the joystick’s components together loosen, creating a gap between those aforementioned metal contacts and graphite pads, reducing contact and resulting in irregular behavior.
By simply squeezing the middle of the Joy-Con, which applied pressure to and compressed the joystick components ensuring solid contact again between the parts inside, the drifting issue miraculously disappeared. As a more permanent fix, Victorstk simply inserted a thin piece of paper—about a millimeter thick—inside the Joy-Con. The paper compresses all of the joystick’s components back together again. Surprisingly, two months later, a Joy-Con that consistently exhibited drift issues has worked perfectly, Victorstk says.
G/O Media may get a commission
Is this a solution that will work for everyone? It’s hard to say. If a consistent build-up of dust and dirt on the contacts inside the Joy-Con is the cause of the problem, no amount of added pressure is going to keep particles out. But it does seem like Victorstk is onto something, and if more Switch users find this simple trick remedies Joy-Con drifting issues, then we might finally have a permanent solution that could be trivial for Nintendo to implement on future hardware.
This latest post on MySQL replication follows the ones we did on Amazon Redshift & Amazon Aurora; naturally, we had to cover Amazon RDS as well and so we look here at how to easily and securely replicate from MySQL to Amazon RDS (and vice versa).
The default generated chart component shows you how you can provide multiple datasets.
If you only want to show a single dataset, you still need to wrap in within a datasets instance.
This is because axes must be provided. The only difference is you need to provide the data axis via the entry
and give a global description via the axes.
You can align a dataset’s label by calling the alignLabel() method on a dataset with start, center or end as parameter.
Stylesheet
Warning! Make sure you insert this component within your base layout template where your chart is not directly used.
Otherwise a custom defined colorscheme won’t be pushed to the CSS stack.
<x-charts-css-stylesheetcdn="unpkg" />
Charts.css host the production CSS file on two difference CDN’s: jsdelivr and unpkg.
You can import the stylesheet by adding the following component to the head within your blade file.
If you add your CSS by using a different way, for example a package manager, you can leave out the cdn attribute.
Then this component will only be used to render the colorscheme definitions.
At the moment there is support for 4 types of charts:
By default, each generated chart is a Column chart. If you want to change the chart type you can overwrite the type
method, or you can inherit the AreaChart, BarChart or LineChart class instead of the Chart class.
When using an area or line chart, you must determine the start of the chart by calling the start method on the first
entry like this:
By default, no legend is being generated and shown. You can change this behaviour by simply overwriting the legend() method.
By calling the withLabel() or withLabels() method on a Legend instance you can add a label.
By default, the legend is displayed vertically. You can change it to horizontally by chaining the inline() method.
The labels do not have any style by default. You can change the shape by calling one of the following methods:
circles()
ellipses()
lines()
rectangles()
rhombuses()
squares()
By default the HTML tag ul is used to display the legend on the screen. If you prefer an ol HTML tag chain the ordered() method.
Colorscheme
Warning! Do not forget to add the <x-charts-css-stylesheet /> to your layout’s head.
Want to change a specific data entry’s color? This can be done by chaining the color method.
Modifications
By overwriting the modifications() method you can add multiple modifications.
Out of the box the ShowHeading modification will be applied when the heading is present
and the modifications Multiple and ShowLabels are applied when there are multiple datasets configured.
All modifications can be found within the Maartenpaauw\Chartscss\Appearance namespace.
By adding DatasetsSpacing or DataSpacing you can configure the space between the data entries. Both constructors accept a number between 1 and 20 defining the amount of space.
The HideData modification will hide the display value of each entry.
The value will still be printed to the screen, but it is hidden by CSS.
This will respect screenreaders.
The ShowDataOnHover modification will hide the data the same way as the HideData modification.
The big difference is it will show the data when you hover it.
When displaying multiple datasets the modification Multiple needs to be added.
Out of the box it is automatically added if there are multiple datasets.
By default, no axes are shown. You can show the primary axis by adding the ShowPrimaryAxis.
Same goes for the ShowDataAxes.
To display the secondary axes you can add the ShowSecondaryAxes modification.
The constructor accepts the amount of axes (with a limit of 10) as the first parameter.
The heading (table caption) will always be printed to the screen to respect screenreaders,
but it will be hidden with CSS by default. If you want to display the heading you need to add the ShowHeading modification.
This modification will be added automatically when the heading is present.
The labels will always be printed to the screen to respect screenreaders,
but they are hidden with CSS by default. If you want to display the labels you need to add the ShowLabels modification.
Feel free to create a pull request or submitting an issue.
In the meanwhile you can add it easily by adding a CustomModification.
Configuration
As mentioned before, the configuration is pretty smart. It adds a ShowHeading modification if a heading is present,
adds the modifications Multiple when multiple datasets are present, it adds the ShowLabels modification when there
are dataset or entry labels defined, and it uses the configured data axes as legend labels when none has been specified.
This is done by wrapping the configuration within a SmartConfiguration decorator. If you do not want this behaviour
you can overwrite the configuration method and build the configuration by yourself.
Stoopid Buddy Stoodios did a great stop-motion video for Snake Eyes.Screenshot: YouTube
Opening later this month, Snake Eyes: G.I. Joe Origins is a brand-new reboot of the famous franchise. So Channing Tatum’s Duke? Dwayne Johnson’s Roadblock? Those guys and everyone around them are gone. Now we’re restarting with Snake Eyes, one of the more popular characters, who also doesn’t usually speak.
That’ll change in this film, though, because Snake Eyes is played by Crazy Rich Asians star Henry Golding. And Golding lends his voice to this super cute, clever new video created by Paramount and Stoopid Buddy Stoodios. It uses G.I. Joe toys to explain who is actually in Snake Eyes, who isn’t, and why this movie exists at all.
The video is obviously messing around but it is accurate. Well-known G.I. Joe characters like Storm Shadow, Baroness, and Scarlet are in the film while the other toys in the video—including Duke, Gung Ho, Lady Jaye and Roadblock—are not. But their inclusion makes it fairly obvious those are characters could appear in sequels, if this movie is a success. Which is certainly not a guarantee.
When the first Snake Eyes trailer was released, we were lucky enough to talk to Golding about the role and he explained that follow-ups to Snake Eyes are already being considered. “I know for a fact that they’re already in the works,” he said. “Speaking to Lorenzo [DiBonaventura], our producer, they’re already thinking, because we can take this anywhere—but depending on how Snake Eyes does in telling specific stories will tell us where we want to take and how to expand the universe. Because if we jump into just a huge G.I. Joe universe and introduce 12 characters, people are going to be like, ‘Oh well yeah. Okay, that guy’s cool. That guy does this thing.’ But they don’t know anything about them. So to be able to build the characters from day one, I think, is the real gift.”
That gift is coming sooner than you might have realized, since Snake Eyes: G.I. Joe Origins opens in theaters July 23. Here’s a new featurette too.
Netflix, as part of its lengthy celebration of all things Witcher-y in today’s “Witcher Con”, has just dropped the first proper trailer for The Witcher season 2, after previously dropping tiny snippets last month.
In season two, on the hunt for the missing mage Yennefer of Vengerberg (Anya Chalotra), Geralt (Henry Cavill) takes Ciri (Freya Allan) to the ancestral home of the Witcher’s school of the Wolf: Kaer Morhen, the same hallowed institute where Geralt once learned, under the guidance of his mentor Vesemir (played by Kim Bodnia this season, and the subject of his own spinoff anime film next month), the ways of monster hunting. But as the world goes to hell all around them across the continent, the various human kingdoms, the elves, and the monsters themselves at each others throats, Geralt quickly discovers that the most dangerous threat of all for Ciri may be the powerful magic that runs deep inside her—magic that only someone as talented as Yennefer could help Ciri temper.
Perhaps some coins will be tossed along the way, as we know at least that Joey Batey’s one-hit-wonder of a Bard, Jaskier, is along for the ride alongside plenty of new cast members this season, including Simon Callow, Adjoa Andoh, Graham McTavish, Cassie Clare, Chris Fulton, and more. We’ll know doubt come to learn much more of Geralt and Ciri’s adventures ahead of The Witcher’s returns to Netflix on December 17.
This year Musk made good on his promise, selling all of his homes. And after Mashable reported that he’s now living in "a prefabricated house near a SpaceX launch site in Texas," made by a company called Boxabl, I checked out their site—and accidentally stumbled across a tour of the actual house Musk is now living in.
For background, Boxabl makes $50,000 pre-fab houses–"Casitas"–that are shipped flatpack and unfolded on site. You can see how this works in the video below, which was shot in Texas in December. The company man giving the tour never says Musk’s name, but wordlessly reveals who the "VIP" is by tour’s end:
Our greatest fears about the Biden administration came to fruition this week. President Puddingbrain announced he’s sending people door-to-door to make sure you’ve made the private medical decision he wants you to make. You know the one. Rhymes with Maxine. It’s a personal decision that his administration claims is the government’s absolute business to know. But at least, in this case, Biden isn’t threatening you with nukes and fighter jets. Yet.
The question remains what to do when the government comes to your door demanding to know private medical information. You may believe, as shocking as this may sound to CNN, that it’s none of the government’s business. JP Spears provides a tutorial on how to handle the situation.
When the Biden Administration Knocks On Your Door…
Of course, no one is advocating violence. That shouldn’t need to be said when the word "comedy" is clearly at the top of this page in blue letters. But, you know.
The media has already been dispatched to clean up Biden’s door-to-door mess. Editors are looking for new and exciting ways to work the words "Republicans" and "seize" into headlines. Brian Stelter is watching Fox News so he has something to talk about on CNN. Lather, rinse, and whatever the third thing is.
Americans still have an issue with a president who claims we yield our rights to him sending anyone door-to-door for any reason. Sears presents a satirical look because laughing is somewhat better than thinking about how bad things really are.
J.R.R. Tolkien Returns With Army Of The Dead To Destroy Everyone Trying To Make ‘Lord Of The Rings’ Woke
WORLD—Terrified progressive scholars, movie executives, journalists, and bloggers ran screaming Thursday as they were confronted by an apparition of J.R.R. Tolkien leading the Dead Men of Dunharrow to destroy anyone who tried to make his work “woke.”
“I summon you — fulfill your oath!” the late Tolkien cried after venturing under the mountain to find the undead army. Tolkien raised Anduril aloft, and the army submitted to the professor, allowing him to lead them into battle against everyone trying to deconstruct his book and make it woke.
From writers pushing “queer readings” of his epic, heavily Catholic, and decidedly traditionalist and non-woke magnum opus to movie studio executives looking for ways to put nudity into their film and show adaptations, thousands fell in battle against the army. Those running the Tolkien Society’s latest woke conference heard a low rumbling and looked into the distance, terrified, to see the professor leading the army against them. “Onward!” a laughing Tolkien cried as the people trying to ruin the greatest book ever written scattered before the awful and terrible sight.
“I release you from your duty,” Tolkien said, causing the army to disappear, before going off to see if he could get any decent tobacco before returning to the afterlife.