This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
https://twitter.com/challengescss/status/1534494160589307904?s=21&t=0YATrbqVwq4M-9hhSZO2nQ | |
<div class="container"> | |
<section class="about"> | |
<h2>About us</h2> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt, quo, rerum. Itaque iure cumque corrupti deleniti blanditiis similique, accusamus veniam placeat rerum! Est debitis quae voluptatem itaque reiciendis consequuntur earum.</p> | |
</section> | |
<section class="products"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Downgrade to Composer v1.x | |
composer self-update --1 | |
# Rollback to Composer v2.x | |
composer self-update --rollback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For Single Table | |
SELECT setval('public."upload_file_morph_id_seq"', | |
(SELECT MAX(id) FROM public.upload_file_morph) | |
); | |
# For All Tables | |
DO $$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
root /var/www/html/public; | |
index index.php index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name project.com www.project.com; # managed by Certbot | |
location / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream sails { | |
ip_hash; | |
keepalive 64; | |
server 127.0.0.1:1400 max_fails=3 fail_timeout=10s; | |
server 127.0.0.1:1400 max_fails=3 fail_timeout=10s; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/my.cf | |
bind-address=0.0.0.0 | |
Restart mysql service run on console: | |
sudo service mysqld restart | |
Create a user with a safe password for remote connection. To do this run following command in mysql | |
(if you are linux user to reach mysql console run mysql and if you set password for root run mysql -p): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\EventListener; | |
use App\Entity\User; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\HttpKernel\Event\ResponseEvent; | |
use Symfony\Component\Routing\RouterInterface; | |
use Symfony\Component\Security\Core\Security; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/environment | |
# add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setsebool -P httpd_can_network_connect on |
NewerOlder