Códigos de exemplo: https://github.com/dianaarnos/pcs2020
Slides: https://speakerdeck.com/dianaarnos/pcs2020-php-alem-do-sincrono
Exemplo Parallel: https://github.com/dianaarnos/php-paralelo/blob/master/hello_world.php
Discussão sobre a extensão Parallel - https://www.reddit.com/r/PHP/comments/aquer0/on_parallel_php_the_next_chapter/
Video do Krakjoe falando sobre a extensão Pthreads: https://www.youtube.com/watch?v=HAZfDy6HTos
Doc da extensão parallel no php.net: https://www.php.net/manual/pt_BR/book.parallel.php
Steve Maraspin - Meet a parallel, asynchronous PHP world -https://www.youtube.com/watch?v=dk-D3g2MD2U
Issue anunciando fim da extensão pthreads: krakjoe/pthreads#929
Cooperative multitasking using coroutines (in PHP!) https://nikic.github.io/2012/12/22/Cooperative-multitasking-using-coroutines-in-PHP.html
Parallel PHP: The Next Chapter - https://blog.krakjoe.ninja/2019/02/parallel-php-next-chapter.html
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
package com.sahajamit.selenium.ws; | |
import org.json.JSONObject; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.logging.LogEntries; | |
import org.openqa.selenium.logging.LogType; | |
import org.openqa.selenium.logging.LoggingPreferences; | |
import org.openqa.selenium.remote.CapabilityType; | |
import org.openqa.selenium.remote.DesiredCapabilities; |
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
# How to get ClamAV working on CentOS 7 | |
yum -y install epel-release && yum -y update | |
yum -y install clamav clamav-data clamav-scanner clamav-scanner-systemd clamav-server clamav-server-systemd clamav-unofficial-sigs clamav-update | |
# Add /etc/clamd.d/freshclam.conf | |
# Add /usr/lib/systemd/system/clamav-freshclam.service | |
systemctl enable clamav-freshclam.service && systemctl start clamav-freshclam.service |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).