Skip to content

Instantly share code, notes, and snippets.

View mralaminahamed's full-sized avatar
💻
Always available

Al Amin Ahamed mralaminahamed

💻
Always available
View GitHub Profile
@marrisonlab
marrisonlab / gist:2d2b1e2423312076256e9def70ff931a
Last active December 21, 2025 17:05
Display Dokan Vendor meta in single product page and loop
/**
* Unified Snippet Dokan + Vendor
* Works with both generic User ID and product loop
* WPCode: PHP Snippet → Run Everywhere
*/
if ( ! function_exists( 'sn_get_product_from_context' ) ) {
function sn_get_product_from_context() {
global $product;
if ( isset( $product ) && is_object( $product ) ) return $product;

Our lives are increasingly intertwined with technology, the storage space on our devices becomes a valuable commodity. Mac users often find themselves grappling with the perennial issue of managing storage space efficiently. Accumulated files, applications, and system clutter can clog up your Mac's storage, slowing down performance and hindering productivity.

In this guide, we'll use the built-in Terminal app to free up space on your Mac without using any third-party software.

1. Empty the Trash

Start by emptying the Trash. Even though this can be done through the Finder, you can also do it via Terminal using the rm command.

sudo rm -rf ~/.Trash/*

@ladislavsulc
ladislavsulc / add-wpcli.sh
Created October 27, 2020 17:29
Add WP CLI to Laragon
cd C:\laragon\usr\bin && curl -L -O https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && echo @ECHO OFF > wp.bat && echo php "%~dp0wp-cli.phar" %* >> wp.bat
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active October 21, 2025 20:04
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in