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
# install pptpd | |
apt-get update | |
apt-get install -y pptpd | |
# add username and password for user | |
vi /etc/ppp/chap-secrets |
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
sudo wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb | |
sudo apt install fontconfig libxrender1 xfonts-75dpi xfonts-base | |
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb |
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 | |
if (!function_exists('titles')) { | |
function titles() | |
{ | |
return [ | |
'Encik' => 'Encik', | |
'Cik' => 'Cik', | |
'Tuan' => 'Tuan', | |
'Puan' => 'Puan', |
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
[ | |
{ | |
"code": "JHR", | |
"name": "Johor" | |
}, | |
{ | |
"code": "KDH", | |
"name": "Kedah" | |
}, | |
{ |
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 split_string_by_length($string, $max_length) | |
{ | |
$array = explode(' ', $string); | |
$length = 0; | |
foreach ($array as $word) { | |
$newLength = $length + strlen($word) + 1; |
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 | |
include_once 'abstract.php'; | |
class FixOrderGrid extends Mage_Shell_Abstract | |
{ | |
/** | |
* Run script | |
* | |
*/ |
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
syntax enable | |
set number " Show line numbers | |
set showmatch " Highlight matching brace | |
set visualbell " Use visual bell (no beeping) | |
set hlsearch " Highlight all search results | |
set smartcase " Enable smart-case search | |
set ignorecase " Always case-insensitive | |
set incsearch " Searches for strings incrementally |
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 | |
class Country { | |
public static $countries = [ | |
"Afghanistan" => "af", | |
"Albania" => "al", | |
"Algeria" => "dz", | |
"American Samoa" => "as", | |
"Andorra" => "ad", | |
"Angola" => "ad", |
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 | |
require_once 'abstract.php'; | |
class Mage_Shell_Assign_Product_Thumbnails extends Mage_Shell_Abstract | |
{ | |
/** | |
* Run script | |
* |
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 namespace App\Services; | |
use Illuminate\Contracts\Hashing\Hasher; | |
class MagentoHasher implements Hasher | |
{ | |
const CHARS_LOWERS = 'abcdefghijklmnopqrstuvwxyz'; | |
const CHARS_UPPERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
const CHARS_DIGITS = '0123456789'; |
NewerOlder