This file contains hidden or 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
// Paypal checkout express, payment type settings for Paypal or Credit Card | |
if ($paymentMethod == 'paypal') { | |
$nvpstr .= "&LANDINGPAGE=Login"; | |
$nvpstr .= "&SOLUTIONTYPE=Mark"; | |
} else { | |
$nvpstr .= "&LANDINGPAGE=Billing"; | |
$nvpstr .= "&SOLUTIONTYPE=Sole"; | |
} |
This file contains hidden or 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
private function computeValidityPeriod($period) | |
{ | |
return date('Y-m-d-H:i:s', strtotime("+$period min")); | |
} |
This file contains hidden or 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
function randomPassword($length = 6) { | |
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; | |
$password = substr( str_shuffle( $chars ), 0, $length ); | |
return $password; | |
} |
This file contains hidden or 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
# How to install Laravel in Ubuntu 16.04 | |
## basic stuff install (optional) | |
sudo apt-get install git | |
sudo apt-get install zip | |
## LAMP | |
sudo apt-get install tasksel |
This file contains hidden or 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 | |
// Generates a strong password of N length containing at least one lower case letter, | |
// one uppercase letter, one digit, and one special character. The remaining characters | |
// in the password are chosen at random from those four sets. | |
// | |
// The available characters in each set are user friendly - there are no ambiguous | |
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
// makes it much easier for users to manually type or speak their passwords. | |
// | |
// Note: the $add_dashes option will increase the length of the password by |
This file contains hidden or 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
(function($) { | |
$.pluginName = function(element, options) { | |
var defaults = { | |
foo: 'bar', | |
onFoo: function() {} | |
} | |
var plugin = this; |
This file contains hidden or 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
/* | |
|---------------------------------------------- | |
| ReadMore Jquery Plugin | |
|---------------------------------------------- | |
| | |
| Created by Cuong Huynh | |
| | |
*/ | |
(function($) { |
This file contains hidden or 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 | |
namespace App\Contracts\Repository; | |
interface IRepository | |
{ | |
/** | |
* Get all | |
* @param array $columns | |
* @return mixed |
This file contains hidden or 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 | |
namespace App\Repositories\Eloquent; | |
use App\Contracts\Repository\IRepository as InterfaceRepository; | |
class BaseEloquentRepository implements InterfaceRepository | |
{ | |
protected $model; | |
This file contains hidden or 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
class LogUtil | |
{ | |
/** | |
* Write a content out file log | |
* @param string $file | |
* @param string $content | |
* @return boolean | |
*/ | |
public static function write($file, $content) | |
{ |
OlderNewer