Skip to content

Instantly share code, notes, and snippets.

@malviyaritesh
malviyaritesh / class-wc-subscriptions-switcher.patch
Last active October 12, 2023 01:39
Allow switching of MnM items in a subscription for WooCommerce.
--- woocommerce-subscriptions/includes/class-wc-subscriptions-switcher.php 2018-12-24 15:06:02.000000000 +0530
+++ class-wc-subscriptions-switcher.php 2019-02-13 17:02:20.231498086 +0530
@@ -730,6 +730,22 @@
$subscription = wcs_get_subscription( $cart_item['subscription_switch']['subscription_id'] );
$existing_item = wcs_get_order_item( $cart_item['subscription_switch']['item_id'], $subscription );
+ /**
+ * ====== CUSTOM CODE START @rmalviya ======
+ */
+ $subs_id = $subscription->get_id();
@kingcosta
kingcosta / host
Last active September 14, 2024 15:54
Plesk Trial License Update Automation
A00C00-4M4705-G4S937-HVNX40-SQDF42
@ntamvl
ntamvl / fixed_kernal_task_high_cpu_on_macos.md
Last active February 21, 2024 11:10
Fixed the fan running high, kernel task taking up 500% cpu (high cpu) on macOS

Fixed the fan running high, kernel task taking up 500% cpu (high cpu)

Step 1: Disable SIP

Enter recovery mode

  • Shutdown your macbook
  • Press keys: Command + R
  • Press power button
  • Release keys Command + R when see Apple logo appear
  • Open Terminal app on recovery screen, then run below command:
@iDavidMorales
iDavidMorales / Curl Shorte.St API
Created June 22, 2018 03:52
Curl Shorte.St API
<?php
function shst($url){
$apiurl="https://api.shorte.st/v1/data/url";
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT' );
// Agregamos el Token que copiamos de la pagina.
curl_setopt($ch, CURLOPT_HTTPHEADER, array('public-api-token: XXXXXXXXXXXXXXXXXXX','X-HTTP-Method-Override: PUT'));
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active April 30, 2025 12:33
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@luckylittle
luckylittle / centos7-rhel8-initialize.sh
Last active January 7, 2025 05:12
Bash script that downloads the most important apps that i use on my CentOS7/RHEL7/RHEL8 laptop
#!/bin/bash
# This is more of a notes, rather than script...
# CentOS 7 #1805 (@luckylittle)
# Majority of apps that i use on my personal CentOS laptop
# CentOS 7 #1805 based on RHEL 7.5 (ISO & VirtualBox)
# wget http://mirror.slu.cz/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1804.iso
# wget https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1804_02.VirtualBox.box
@nzec
nzec / README.MD
Last active May 7, 2025 02:47
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb
@AkdM
AkdM / Edit_Repack_ISO_tutorial.md
Last active May 12, 2025 06:21
Edit and repack .iso bootable image

On Linux

Installing mkisofs

apt-get install mkisofs

Editing ISO image

mkdir /tmp/custom_iso

@lukapaunovic
lukapaunovic / Megatools CentOS install
Last active October 6, 2020 12:17
Megatools CentOS install
yum -y install gcc make glib2-devel libcurl-devel openssl-devel gmp-devel tar automake autoconf libtool wget asciidoc -y
wget https://megatools.megous.com/builds/megatools-1.10.0-rc1.tar.gz
tar -xzvf megatools*.tar.gz
cd megatools*
./configure
make
make install