Skip to content

Instantly share code, notes, and snippets.

View clouedoc's full-sized avatar
🌴
Doing absolutely nothing

Camille Louédoc-Eyriès clouedoc

🌴
Doing absolutely nothing
View GitHub Profile
@clouedoc
clouedoc / googlefetch.go
Created July 15, 2018 11:11
Finally friendly got it right, thanks @ghetzel !
package main
import (
"fmt"
"github.com/ghetzel/go-webfriend"
"github.com/ghetzel/go-webfriend/browser"
"github.com/ghetzel/go-webfriend/commands/core"
"log"
"time"
)
@clouedoc
clouedoc / catching.md
Created August 30, 2019 14:16
Catching VueJS vue-apollo mutation error

In fact, this.$apollo.mutate is a Promise.

                this.$apollo.mutate({
                    mutation: ADD_USER_MUTATION,
                    variables: {
                      // your mutation variables
                    }
                }).catch(error => {
                    // handle errors here
 console.log("error: ", error)
@clouedoc
clouedoc / include_in_head.liquid
Created October 27, 2019 08:59
Shopify LiveSession track.js integration
{% comment %}
Please, copy and paste this in between LiveSession's <script> and </script> beacons.
{% endcomment %}
{% if customer %}
__ls("identify", {
name: "{{ customer.name }}",
email: "{{ customer.email }}",
{% if customer.last_order %}
params: {
@clouedoc
clouedoc / cartflows_facebook_advanced_mapping.html
Last active February 21, 2020 21:55
Enable Facebook Pixel Advanced Mapping with CartFlows
<!-- replace FACEBOOK_PIXEL_ID with your Facebook Pixel's ID -->
<!-- place this script in the "Custom Script" section of your CartFlows step -->
<!-- this will send user checkout informations to Facebook when one of the following buttons are clicked: the next tab button (bottom of first step) or the second tab button (at the top of the two columns checkout) -->
<!-- let's make this bread!! -->
<script>
// this function will execute the given method when jQuery becomes available
function defer(method) {
if (window.jQuery) {
method();
@clouedoc
clouedoc / cartflows_mautic_contact_tracking.html
Created February 22, 2020 19:14
CartFlows automatic Mautic contact information population - can be used to send abandonment carts(not RGPD compliant !)
<!-- NOTE: concerning phone number validation; replace FR with your targeted country code -->
<!-- libphonenumber-mex: validation du numéro de téléphone -->
<script src="https://unpkg.com/libphonenumber-js@1.7.44/bundle/libphonenumber-max.js"></script>
<!-- choppage des informations du visiteur -->
<script>
function deferMauticJQuery(method) {
if (Boolean(window.jQuery) && Boolean(window.MauticJS)) {
method();
@clouedoc
clouedoc / convert_parallels_to_iso.md
Created November 10, 2020 07:40
How to convert a parallels Virtual Machine to an ISO file ?

Converting a Parallels Virtual Machine to an ISO File

The method consists of using a GParted live CD (well, virtual ISO) that you boot on your virtual machine. Note that you'll have to change the boot order.

@clouedoc
clouedoc / podman-macos.md
Last active April 3, 2021 08:33
Installing Podman on MacOS using Vagrant (Arch Linux flavor). Last updated: april 2021

Installing Podman on MacOS

There is no standard or easy way to install Podman on your machine. So here is my flavour. I want it straightforward, easy to comprehend, and lighter than alternatives.

Introducing the Vagrant X Podman method, that I've just stolen from this blog post and modified to use Arch Linux instead.

The goal is to install an Arch Linux virtual machine using Vagrant, install podman on it, and then connect to it using podman-remote from the MacOS host.

Creating an Arch Linux podman-server guest.

@clouedoc
clouedoc / antidetect.md
Created April 13, 2021 20:40
puppeteer-extra-plugin-stealth evasions for Antidetect browsers (Multilogin)

puppeteer-extra-plugin-stealth evasions for antidetect browsers

Multilogin

To check

Everything

Not needed

@clouedoc
clouedoc / triple-click.md
Last active April 14, 2021 13:02
Studying triple click's event flow

Studying triple click's property

When should we send mousedown and mouseup events?

document.querySelector('body').onmousedown = () => console.log('mousedown; ' + new Date().getSeconds() + ":" + new Date().getUTCMilliseconds())
document.querySelector('body').onmouseup = () => console.log('mouseup; ' + new Date().getSeconds() + ":" + new Date().getUTCMilliseconds())

Gives:

@clouedoc
clouedoc / multilogin_puppeteer.md
Created April 21, 2021 22:01
Unofficial documentation of Multilogin + puppeteer

clouedoc's Multilogin documentation

net::ERR_INVALID_AUTH_CREDENTIALS

When using a proxy with authentication, this error does come up.

The solution is to:

  1. add delay
  2. make the page go to a dummy URL first (httpbin.org/ip) and handle the ERR_INVALID_AUTH_CREDENTIALS error by throwing a warning