Skip to content

Instantly share code, notes, and snippets.

View rodrigoslayertech's full-sized avatar
🤔

Rodrigo Vieira rodrigoslayertech

🤔
View GitHub Profile
@dianaarnos
dianaarnos / pcs2020.md
Last active April 3, 2023 00:10
PHP Communit Summit 2020

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

@sahajamit
sahajamit / CaptureWSMessages.java
Last active May 31, 2024 07:15
Capture WebSocket Network Calls with WebDriver
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;
@fgilio
fgilio / axios-catch-error.js
Last active February 27, 2025 05:50
Catch request errors with Axios
/*
* 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 😨
@AfroThundr3007730
AfroThundr3007730 / 00-clamav-notes.sh
Last active February 5, 2022 05:54
My notes on getting ClamAV working on CentOS 7
# 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
@cobyism
cobyism / gh-pages-deploy.md
Last active May 20, 2025 01:15
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

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.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).