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
@tameemsafi
tameemsafi / emails.php
Last active April 15, 2024 12:42
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) {
@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
@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 ) {
@cferdinandi
cferdinandi / terminal-cheat-sheet.txt
Last active April 24, 2024 17:51
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
@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');