Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Availabe

Stefan lzomedia

🤖
Availabe
View GitHub Profile
@lzomedia
lzomedia / readme.md
Created Jun 20, 2021
Force Index PHPSTORM
View readme.md

For IntelliJ 2021.1 this seems reindex jdk as well as all libraries:

Help / Diagnostic Tools / Profile Indexing

Im am not aware if earlier version have that feature.

View gist:eb36a5e9cbf81ca6b31d756b3629390a
[
{
"url": "https://www.hitc.com/en-gb/2021/06/17/fast-and-furious-9-f9-where-to-watch-netflix-amazon-prime-hbo-max-hulu-theaters/",
"response": {
"usage": {
"text_units": 1,
"text_characters": 2038,
"features": 4
},
"language": "en",
View gist:5e5c3f0073d3e01ebd325512df6934f2
[
{
"url": "https://www.dualshockers.com/who-is-alice-in-genshin-impact-klee-lore-explained/",
"response": {
"usage": {
"text_units": 1,
"text_characters": 4667,
"features": 4
},
"language": "en",
View gist:1b71da9977d90404c88643bee0be23f4
[
{
"url": "https://www.dailymail.co.uk/tvshowbiz/article-9700193/Catherine-Deneuve-77-looks-effortlessly-graceful-Dior-Cruise-fashion-Athens.html",
"response": {
"usage": {
"text_units": 1,
"text_characters": 6958,
"features": 4
},
"language": "en",
@lzomedia
lzomedia / guzzle.php
Last active May 26, 2021
Guzzle Parallel Extract
View guzzle.php
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\Promise as GuzzlePromise;
$client = new GuzzleClient(['timeout' => 12.0]); // see how i set a timeout
$requestPromises = [];
$sitesArray = SiteEntity->getAll(); // returns an array with objects that contain a domain
foreach ($sitesArray as $site) {
$requestPromises[$site->getDomain()] = $client->getAsync('http://' . $site->getDomain());
View gist:25b3dd5e75ada0624f7387a8259d57dd
*/2 * * * * php72 /home/admin/web/lzomarketing.com/public_html/bin/console mautic:segments:update > /home/admin/web/lzomarketing.com/logs/cron/segments_update.log 2>&1
*/3 * * * * php72 /home/admin/web/lzomarketing.com/public_html/bin/console mautic:campaigns:rebuild > /home/admin/web/lzomarketing.com/logs/cron/campaigns_rebuild.log 2>&1
*/4 * * * * php72 /home/admin/web/lzomarketing.com/public_html/bin/console mautic:campaigns:trigger > /home/admin/web/lzomarketing.com/logs/cron/campaigns_trigger.log 2>&1
*/5 * * * * php72 /home/admin/web/lzomarketing.com/public_html/bin/console mautic:emails:send > /home/admin/web/lzomarketing.com/logs/cron/emails_sends.log 2>&1
*/6 * * * * php72 /home/admin/web/lzomarketing.com/public_html/bin/console mautic:messages:send > /home/admin/web/lzomarketing.com/logs/cron/messages_sends.log 2>&1
*/7 * * * * php72 /home/admin/web/lzomarketing.com/public_html/bin/console mautic:broadcasts:send > /home/admin/web/lzomarketing.com/logs/cron/broadcasts.log 2>&1
*/8 * * * * php72 /home
@lzomedia
lzomedia / Delete-wordpress posts
Created Feb 16, 2021
Delete All Wordpress Posts Using SQL
View Delete-wordpress posts
DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b
ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c
ON (a.ID = c.post_id)
WHERE a.post_type = '{{your CPT}}';
View composer-wp
{
"name": "roots/bedrock",
"type": "project",
"license": "MIT",
"description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure",
"homepage": "https://roots.io/bedrock/",
"authors": [
{
"name": "Scott Walkinshaw",
"email": "scott.walkinshaw@gmail.com",
@lzomedia
lzomedia / gist:797e505e37bced49ddbc511d1dd331e9
Created Nov 7, 2019 — forked from pawelmhm/gist:8917867
Scrapy spider crawling Stack Overflow
View gist:797e505e37bced49ddbc511d1dd331e9
from scrapy.spider import Spider
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from scrapy.item import Item, Field
import urllib
class Question(Item):
tags = Field()
answers = Field()
@lzomedia
lzomedia / xdebug_devilbox_phpstorm_postman.md
Created Jul 18, 2019 — forked from marcandreappel/xdebug_devilbox_phpstorm_postman.md
Using Xdebug on Devilbox with PhpStorm and Postman
View xdebug_devilbox_phpstorm_postman.md

Host OS

Tested on:

  • openSUSE 15.1 Leap
  • Fedora 30

Check before setup:

  • Accept in the firewall the port 9000 TCP

Docker