Skip to content

Instantly share code, notes, and snippets.

View kshirodpatel's full-sized avatar
🎯
Focusing

Kshirod Patel kshirodpatel

🎯
Focusing
  • https://github.com/magnigenie-labs
  • Bhubaneswar
View GitHub Profile
@menzerath
menzerath / backup.php
Last active February 18, 2024 19:33
PHP: Recursively Backup Files & Folders to ZIP-File
<?php
/*
* PHP: Recursively Backup Files & Folders to ZIP-File
* MIT-License - 2012-2018 Marvin Menzerath
*/
// Make sure the script can handle large folders/files
ini_set('max_execution_time', 600);
ini_set('memory_limit', '1024M');
@cferdinandi
cferdinandi / terminal-cheat-sheet.txt
Last active November 6, 2024 09:24
Terminal Cheat Sheet
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@bekarice
bekarice / edd-custom-payment-statuses.php
Last active February 28, 2019 06:27
Add custom EDD payment statuses
<?php // only copy if needed
/**
* Adds new payment statuses to array of available statuses
*
* @param string[] $payment_statuses the core payment statuses
* @param string[] updated set of statuses
*/
function sww_add_edd_payment_statuses( $payment_statuses ) {
@AdReVice
AdReVice / Sublime Text 3 Build 3103 License Key - CRACK
Created July 6, 2016 10:25
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@tameemsafi
tameemsafi / emails.php
Last active July 29, 2024 21:04
Send an email programmatically in wordpress with wp_mail using the woocommerce transaction emails template.
<?php
// Define a constant to use with html emails
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8'));
// @email - Email address of the reciever
// @subject - Subject of the email
// @heading - Heading to place inside of the woocommerce template
// @message - Body content (can be HTML)
function send_email_woocommerce_style($email, $subject, $heading, $message) {