Skip to content

Instantly share code, notes, and snippets.

@gaelgerard
gaelgerard / connect_linkedin.js
Last active October 6, 2023 12:52 — forked from bertolo1988/connect_linkedin.js
Quickly your LinkedIn network
// 1. load https://www.linkedin.com/mynetwork/
// 2. make sure your LinkedIn is in English
// 3. paste this script on chrome dev tools at your own risk
async function moreConnectionsPlease() {
// maximum limit of Connect buttons clicked
const LIMIT = 500;
// wait in ms before each scroll
const SCROLL_TIMEOUT = 600;
// bulk scroll will scroll this amount of times
@gaelgerard
gaelgerard / woo-update-product-stock-qty.php
Created January 22, 2024 09:39 — forked from stuart-lambon/woo-update-product-stock-qty.php
Updates WooCommerce product stock quantity programmatically. $sku and $qty variables need to be filled.
<?php
$sku = 'ITEM001';
$qty = 1;
// Get product_id from SKU — returns null if not found
$product_id = wc_get_product_id_by_sku( $sku );
// Process if product found
if ( $product_id != null ) {