Skip to content

Instantly share code, notes, and snippets.

<?php
/*
This script will allow you to send a custom email from anywhere within wordpress
but using the woocommerce template so that your emails look the same.
Created by craig@123marbella.com on 27th of July 2017
Put the script below into a function or anywhere you want to send a custom email
*/
@frank-liu
frank-liu / gist:c40a094869c371e97b7e50088106f392
Created June 11, 2018 13:10 — forked from danpette/gist:a4f9cd207f669f99b882
Ubuntu 14.04 Setup: nginx + varnish + memcached + php5.6 + mysql5.6 + Mongodb 2.6.7 + phpmyadmin
# Basic
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install htop
sudo apt-get install curl
#MySQL
sudo apt-get install mysql-server-5.6 php5-mysql
sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation
@frank-liu
frank-liu / AES-256 encryption and decryption in PHP and C#.md
Created January 12, 2018 15:00
AES-256 encryption and decryption in PHP and C#

AES-256 encryption and decryption in PHP and C#

PHP

<?php

$plaintext = 'My secret message 1234';
$password = '3sc3RLrpd17';
$method = 'aes-256-cbc';
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>