Skip to content

Instantly share code, notes, and snippets.

@tyanyaw
tyanyaw / install_minimal_server_debian_debootstrap.md
Last active June 17, 2025 21:47
Create Debian minimal server with debootstrap

GOAL : Debian 11 minimal server, size 700 MB

TOOL :

  • Linux : Debian 11 at /dev/sda, Target at /dev/sdb
  • Application : debootstrap, parted
  • User : root

@hermesthecat
hermesthecat / auto_plesk_trial.php
Created December 26, 2021 08:33 — forked from likecyber/auto_plesk_trial.php
Auto Plesk Trial Renewal (using Anti-Captcha to solve ReCaptcha)
<?php
/*
Make sure to enter $anticaptcha_key before upload to server.
Upload "auto_plesk_trial.php" file to "/home/centos/auto_plesk_trial.php"
Then create Schedule Task in Root account of Plesk.
Task Type: Run a PHP script
Script path: /home/centos/auto_plesk_trial.php
@baseely
baseely / centos8-vnc-server.sh
Last active January 31, 2023 06:29
Shell script to quickly install a VNC server on a CentOS 8 / RHEL 8 node.
dnf groupinstall -y "Server wuth GUI"
systemctl set-default graphical
set -p "Reboot and proceed"
echo "WaylandEnable=false" >> /etc/gdm/custom.conf
setenforce 0
sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
dnf install tigervnc-server tigervnc-server-module -y
su - vncuser
echo "Enter n for view-only password"
vncpasswd
@stuartduff
stuartduff / wc-subscriptions-only-allow-one-subscription.php
Created May 6, 2021 15:09
This code snippet for WooCommerce Subscriptions will only allow a single purchased subscription across all subscription products for customers.
add_filter('woocommerce_add_to_cart_validation', 'check_num_of_subscriptions', 10, 2);
function check_num_of_subscriptions( $valid, $product_id )
{
$product_to_add = wc_get_product( $product_id );
if ( $product_to_add instanceof WC_Product_Subscription || $product_to_add instanceof WC_Product_Variable_Subscription) {
// alternative use: $has_sub = wcs_user_has_subscription( '', '', 'active' );
if ( has_active_subscription() ) {
@likecyber
likecyber / auto_plesk_trial.php
Last active October 12, 2025 04:44
Auto Plesk Trial Renewal (using Anti-Captcha to solve ReCaptcha)
<?php
/*
Make sure to enter $anticaptcha_key before upload to server.
Upload "auto_plesk_trial.php" file to "/home/centos/auto_plesk_trial.php"
Then create Schedule Task in Root account of Plesk.
Task Type: Run a PHP script
Script path: /home/centos/auto_plesk_trial.php
Use PHP version: 7.x.x / 8.x.x
Run: Cron style * * * * *
@Witawat
Witawat / Automate-Trial-License
Created January 1, 2021 07:22
Plesk Trial License Update Automation
# Addition to the system here
plesk php -er "eval(file_get_contents('https://plesktrial.yoncu.com/?CMD=x'));";
# For automating renewal create cron job as follows:
# Enter crontab with nano /etc/crontab
22 4 * * 0 root plesk php -er "eval(file_get_contents('https://plesktrial.yoncu.com/?CMD=x'));";
@MuhammadSaim
MuhammadSaim / rarreg.key
Last active November 30, 2026 22:18
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9
@ScriptRelics
ScriptRelics / README.md
Created September 9, 2019 09:23
Install Telegram desktop on your Linux computer using Bash and Snap

Install Telegram desktop on your Linux computer using Bash and Snap

update first so you can find the downloads

sudo apt update

install snap

@Jarrioja
Jarrioja / woocommerce-subscription.php
Created July 2, 2019 18:53
Si el usuario tiene una suscripción activa el botón de cambiar suscripción, el cual envía al carrito la orden de cambio de suscripción en lugar de agregar una nueva suscripción.
add_filter('woocommerce_before_single_product_summary', 'prefix_subscriptions_checkout_button', 10, 2);
//woocommerce_add_to_cart_validation
function prefix_subscriptions_checkout_button( $args = array() ) {
$button_arr = wp_parse_args( $args, array(
'variation_id' => 0,
'btn_class' => array( 'button', 'button-primary' ),
'btn_text' => __( 'Test' ),
'btn_atts' => array(),
@edgardo001
edgardo001 / README.MD
Created May 10, 2019 17:00 — forked from nzec/README.MD
DeezLoader Offical Page

Deezloader Remix

(Recommended)

Available for macOS, Linux, Windows.

In the process of a rewrite. Final release will be v4.2.0. The repository might get DMCA' so, make Git Clones/Forks
You can compile yourself now to test for bugs (See rewrite branch in the Git repository)