This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Analog Clock using Canvas</title> | |
</head> | |
<body> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Billing and shipping addresses fields | |
add_filter( 'woocommerce_default_address_fields' , 'filter_default_address_fields', 20, 1 ); | |
function filter_default_address_fields( $address_fields ) | |
{ | |
// Only on checkout page | |
if( ! is_checkout() ) return $address_fields; | |
// All field keys in this array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WooCommerce Shipping Contact | |
Plugin URI: https://github.com/helgatheviking/wc-shipping-contact | |
Description: Add a shipping email field to checkout and notify of new orders | |
Version: 1.1.0 | |
Author: Kathy Darling | |
Author URI: http://kathyisawesome.com | |
Requires at least: 4.0 | |
Tested up to: 4.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ordinal($num) | |
{ | |
$last=substr($num,-1); | |
if( $last>3 or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function is_valid_email($email, $test_mx = false) | |
{ | |
if( eregi("^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email) ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$databasehost = "localhost"; | |
$databasename = "test"; | |
$databasetable = "sample"; | |
$databaseusername="test"; | |
$databasepassword = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TTF_Init() must be called before using this function. | |
// Remember to call TTF_Quit() when done. | |
void drawText | |
(SDL_Surface* screen, char* string, | |
int size, int x, int y, | |
int fR, int fG, int fB, | |
int bR, int bG, int bB) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getRealIpAddr() | |
{ | |
if ( !empty( $_SERVER['HTTP_CLIENT_IP'] ) ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title> | |
Sending attachment using PHP | |
</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
IF NOT EXIST %WINDIR%\System32\GroupPolicy goto next | |
echo Deleting GroupPolicy folder... | |
RD /S /Q "%WINDIR%\System32\GroupPolicy" || goto error | |
echo. | |
:next | |
IF NOT EXIST %WINDIR%\System32\GroupPolicyUsers goto next2 |
NewerOlder