Skip to content

Instantly share code, notes, and snippets.

View Basilakis's full-sized avatar
🏠
Working from home

Basilis Kanonidis Basilakis

🏠
Working from home
View GitHub Profile
@Basilakis
Basilakis / cloudways-mautic.sh
Last active February 27, 2020 12:54 — forked from heathdutton/cloudways-mautic.sh
Recommended cron tasks for Mautic 2 in Cloudways.
# Recommended cron tasks for Mautic 2 in Cloudways.
# All tasks are ran as www-data
# Output is ignored to avoid log file overhead.
# --quiet is used to reduce MySQL overhead on some tasks.
# --max-contacts is used to prevent one object's backlog from locking updates for other object.
# SEGMENTS
# Update all segments.
*/5 * * * * php /home/master/applications/fwhtzfeudw/public_html/app/console mautic:segments:update --max-contacts=10000 --quiet >/dev/null 2>&1
@Basilakis
Basilakis / acf_repeater_shortcode.php
Created September 23, 2020 20:30 — forked from FranciscoG/acf_repeater_shortcode.php
An Advanced Custom Fields shortcode that allows to loop through a field with a repeater. This only handles simple cases, it can't handle nested repeater fields
<?php
/**
* ACF Pro repeater field shortcode
*
* I created this shortcode function because it didn't exist and it was being requested by others
* I originally posted it here: https://support.advancedcustomfields.com/forums/topic/repeater-field-shortcode/
*
* @attr {string} field - (Required) the name of the field that contains a repeater sub group
* @attr {string} sub_fields - (Required) a comma separated list of sub field names that are part of the field repeater group
* @attr {string} post_id - (Optional) Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc
@Basilakis
Basilakis / linkedin-unfollow-everyone.js
Created October 27, 2020 15:18 — forked from brunolemos/linkedin-unfollow-everyone.js
Unfollow everyone on Linkedin
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
@Basilakis
Basilakis / wp-update.sh
Created December 18, 2020 18:23 — forked from pacoorozco/wp-update.sh
Backup and update a Wordpress Site using wp-cli
#!/usr/bin/env bash
##########################################################################
# Shellscript: Backup and update WordPress using wp-cli
# Author : Paco Orozco <paco@pacoorozco.info>
# Requires : wp-cli
##########################################################################
# Changelog
# 20170125: 1.0
# Adds a default option to upgrade only when it's needed.
# 20161220: 0.1

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@Basilakis
Basilakis / helpscout-docs-to-csv.js
Created March 16, 2021 17:14 — forked from rosinghal/helpscout-docs-to-csv.js
Import helpscout docs to CSV
const Axios = require("axios");
const { createObjectCsvWriter } = require("csv-writer");
const HELPSCOUT_API_KEY = "<<YOUR_HELPSCOUT_API_KEY>>";
const helpscoutInstance = Axios.create({
baseURL: "https://docsapi.helpscout.net/v1",
auth: {
username: HELPSCOUT_API_KEY,
password: "X"