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
<div class="table-wrap"> | |
<table> | |
<thead> | |
<tr><th>TH 1</th><th>TH 2</th></tr> | |
</thead> | |
<tbody> | |
<tr><td>A1</td><td>A2</td></tr> | |
<tr><td>B1</td><td>B2</td></tr> | |
<tr><td>C1</td><td>C2</td></tr> | |
<tr><td>D1</td><td>D2</td></tr> |
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
// Flex-box help | |
// Mobile First | |
.flexbox { | |
display flex | |
flex-direction row | |
flex-wrap nowrap | |
justify-content space-between | |
align-items center | |
align-content center | |
} |
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
// Adding current user to www-data | |
sudo adduser $USER www-data | |
//change ownership to user:www-data and | |
sudo chown $USER:www-data -R /var/www/html | |
sudo chmod u=rwX,g=srX,o=rX -R /var/www/html | |
// change file permissions of existing files and folders to 755/644 | |
sudo find /var/www/html -type d -exec chmod g=rwxs "{}" \; |
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
var data = [ | |
{ | |
name: 'a1', children: [ | |
{ | |
name: 'b1', children: [ | |
{ name: 'gap' }, { name: 'bar' } | |
] | |
} | |
] | |
}, |
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
<svg viewBox="0 0 1024 1024" style="width:100px;height:100px"> | |
<defs> | |
<clipPath id="hexagon_clip"> | |
<path id="hexagon" d="M75.094,306.009c0-27.5,19.413-61.375,43.14-75.277L468.861,25.286c23.727-13.902,62.553-13.902,86.28,0 l350.625,205.445c23.729,13.902,43.141,47.777,43.141,75.277v412c0,27.5-19.412,61.375-43.141,75.277L555.141,998.731 c-23.727,13.901-62.553,13.901-86.28,0L118.234,793.286c-23.727-13.902-43.14-47.777-43.14-75.277V306.009z" /> | |
</clipPath> | |
</defs> | |
<image xlink:href="http://placehold.it/100x100" x="0" y="0" width="100%" height="100%" clip-path="url(#hexagon_clip)" /> | |
<use xlink:href="#hexagon" x="0" y="0" stroke="#000" stroke-width="20" fill="transparent" /> | |
</svg> |
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
Multiple PHP versions, the easy way | |
5 min | by Michael Moravec – 27. 3. 2017 | |
Always wanted to try or run your application with a different PHP version without breaking everything else? Why not, there is a way to run multiple versions in parallel! | |
Basics | |
There's a lot of use cases when one would need multiple PHP versions side by side. As an example, assume we have one legacy application and one modern application. The legacy one runs only on PHP 5.x whereas the modern one runs only on PHP 7.x. Virtually impossible and disjunctive setup you'd say, right? Before you start thinking about setting up second server with new PHP, consider the option of having two PHP versions side by side and letting your application choose one. | |
What do we need |
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 { | |
listen 80; | |
listen [::]:80; | |
server_name dev.domain.com; | |
root /home/kiennguyen/projects/foldername; | |
index index.php index.html index.htm; |
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?://[^\/]*?/)([^"]*?\.(jpg|png|js|webp|svg|css|pdf)) | |
/media/courts-aws/assets/$2 |
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
/vendor/magento/framework/View/Asset/File.php | |
public function getUrl() | |
{ | |
return '/static/' . $this->getPath(); | |
} |
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
# cd /etc/nginx/ | |
# sudo mkdir ssl | |
# sudo openssl req -x509 -sha256 -newkey rsa:2048 -keyout cert.key -out cert.pem -days 1024 -nodes -subj '/CN=www.domain.local' | |
upstream fastcgi_backend { | |
# use tcp connection | |
# server 127.0.0.1:9000; | |
# or socket | |
server unix:/run/php/php7.0-fpm.sock; | |
} |
NewerOlder