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
// Search for URL params | |
// i.e. search 'customer[comments]' | |
var getcomment = checkParam(getUrlParameter('customer%5Bcomment%5D')); | |
function getUrlParams(param) | |
{ | |
var pageURL = window.location.search.substring(1); | |
var urlVar = pageURL.split('&'); | |
for (var i = 0; i < urlVar.length; i++) | |
{ |
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 merge multiple PDFs into one document. | |
public static function mergepdf() | |
{ | |
$dir = '/path/to/file/'; | |
$fileArray= array($dir."number1.pdf",$dir."number2.pdf"); | |
$datadir = $dir; | |
$outputName = $datadir."merged.pdf"; |
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
var phone = $("#phone").val(); | |
phone = phoneFormat(phone); | |
function phoneFormat(phone) { | |
phone = phone.replace(/[^0-9]/g, ''); | |
phone = phone.replace(/(\d{3})(\d{3})(\d{4})/, "$1.$2.$3"); | |
return phone; | |
} |
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 | |
/** @var \Magento\Shipping\Model\Config $methods */ | |
$shippingConfig = $this->objectManager->create('Magento\Shipping\Model\Config'); | |
$deliveryMethods = $shippingConfig->getAllCarriers(); | |
/** @var \Magento\Framework\App\Config\ScopeConfigInterface $scopConfig */ | |
$scopeConfig = $this->objectManager->create('Magento\Framework\App\Config\ScopeConfigInterface'); | |
$carriers = []; |
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\Logger; | |
class Logger extends \Monolog\Logger | |
{ | |
const MAX_SIZE = 2097152; | |
/** | |
* Truncates the log file per iteration. |
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
* text=auto | |
###### Git | |
.gitattributes text | |
.gitignore text | |
.gitconfig text | |
.gitmodules text | |
##### Windows | |
*.bat text eol=crlf |
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
# frozen_string_literal: true | |
module PubliclyIdentifiable | |
extend ActiveSupport::Concern | |
include ActiveModel::Validations | |
included do | |
attribute :public_id, default: -> { PubliclyIdentifiable.generate_public_id } | |
end |
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
# frozen_string_literal: true | |
class BaseOperation | |
include Callee | |
include Dry::Monads[:do, :result] | |
private | |
def capture_and_fail(message, exception) | |
Rails.logger.error(exception.message) |