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
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> | |
<body class="home"> | |
<div class="container-fluid display-table"> | |
<div class="row display-table-row"> | |
<div class="col-md-2 col-sm-1 hidden-xs display-table-cell v-align box" id="navigation"> | |
<div class="logo"> | |
<a hef="home.html"><img src="http://jskrishna.com/work/merkury/images/logo.png" alt="merkery_logo" class="hidden-xs hidden-sm"> | |
<img src="http://jskrishna.com/work/merkury/images/circle-logo.png" alt="merkery_logo" class="visible-xs visible-sm circle-logo"> | |
</a> | |
</div> |
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
<!-- country codes (ISO 3166) and Dial codes. --> | |
<select name="countryCode" id=""> | |
<option data-countryCode="GB" value="44" Selected>UK (+44)</option> | |
<option data-countryCode="US" value="1">USA (+1)</option> | |
<optgroup label="Other countries"> | |
<option data-countryCode="DZ" value="213">Algeria (+213)</option> | |
<option data-countryCode="AD" value="376">Andorra (+376)</option> | |
<option data-countryCode="AO" value="244">Angola (+244)</option> | |
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option> | |
<option data-countryCode="AG" value="1268">Antigua & Barbuda (+1268)</option> |
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
body { | |
padding-top: 40px; | |
} | |
header { | |
background: #f5b335; | |
height: 40px; | |
position: fixed; | |
top: 0; | |
transition: top 0.2s ease-in-out; |
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
/* Written by Amit Agarwal */ | |
function getTrackingGIF(account, email, subject) { | |
var imgURL = "https://ssl.google-analytics.com/collect?" | |
+ "v=1&t=event" | |
+ "&tid=" + account | |
+ "&z=" + Math.round((new Date()).getTime()/1000).toString() | |
+ "&cid=" + Utilities.getUuid() |
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
< = < or < | |
> = > or > | |
/ = / | |
] = ] | |
[ = [ | |
" = " or " | |
' = ' | |
“ = “ or “ | |
” = ” or “ | |
‘ = ‘ 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 options | |
pid = /var/run/hhvm/pid | |
; hhvm specific | |
hhvm.server.file_socket = /var/run/hhvm/hhvm.sock | |
hhvm.server.type = fastcgi | |
hhvm.server.default_document = index.php | |
hhvm.server.user = www-data |
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
Simple regex | |
Regex quick reference | |
[abc] A single character: a, b or c | |
[^abc] Any single character but a, b, or c | |
[a-z] Any single character in the range a-z | |
[a-zA-Z] Any single character in the range a-z or A-Z | |
^ Start of line | |
$ End of line | |
\A Start of string |
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 | |
/** used to generate password parameter for api */ | |
function accessKey($apiKey, $time) | |
{ | |
$hash = hash_hmac('md5', $time, $apiKey); | |
return $time. ":". $hash; | |
} |
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 lang="en" ng-app="app"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Helllo world</title> | |
</head> | |
<body> | |
<div ng-controller="Start as start"> | |
<h1>Fruit default color : {{start.fruit.color}}<h1> | |
<h1>Apple default color : {{start.apple.color}}<h1> |
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
//Mark Virtual Orders as Complete | |
add_filter( 'woocommerce_payment_complete_order_status', 'virtual_order_payment_complete_order_status', 10, 2 ); | |
function virtual_order_payment_complete_order_status( $order_status, $order_id ) { | |
$order = new WC_Order( $order_id ); | |
if ( $order_status == 'processing' && | |
( $order->status == 'on-hold' || $order->status == 'pending' || $order->status == 'failed' ) ) { | |
$virtual_order = true; |