Skip to content

Instantly share code, notes, and snippets.

View cuongdcdev's full-sized avatar
🔥
👷🔨🪚💻

Cuong DC cuongdcdev

🔥
👷🔨🪚💻
View GitHub Profile
<?php
use Base32\Base32;
/**
* Class for options
*/
final class BackWPup_Option {
/**
{"items":[{"matp":"01","name":"Thành phố Hà Nội","type":"Thành phố Trung ương","huyen":[{"maqh":"001","name":"Quận Ba Đình","type":"Quận","matp":"01","xa":[{"xaid":"00001","name":"Phường Phúc Xá","type":"Phường","maqh":"001"},{"xaid":"00004","name":"Phường Trúc Bạch","type":"Phường","maqh":"001"},{"xaid":"00006","name":"Phường Vĩnh Phúc","type":"Phường","maqh":"001"},{"xaid":"00007","name":"Phường Cống Vị","type":"Phường","maqh":"001"},{"xaid":"00008","name":"Phường Liễu Giai","type":"Phường","maqh":"001"},{"xaid":"00010","name":"Phường Nguyễn Trung Trực","type":"Phường","maqh":"001"},{"xaid":"00013","name":"Phường Quán Thánh","type":"Phường","maqh":"001"},{"xaid":"00016","name":"Phường Ngọc Hà","type":"Phường","maqh":"001"},{"xaid":"00019","name":"Phường Điện Biên","type":"Phường","maqh":"001"},{"xaid":"00022","name":"Phường Đội Cấn","type":"Phường","maqh":"001"},{"xaid":"00025","name":"Phường Ngọc Khánh","type":"Phường","maqh":"001"},{"xaid":"00028","name":"Phường Kim Mã","type":"Phường","maqh":"001"},{"xai
<?php
use \Inpsyde\BackWPup\Pro\Settings;
/**
* BackWPup_Admin
*/
final class BackWPup_Admin {
public $page_hooks = [];
<?php
use \Inpsyde\BackWPup\Pro\Settings;
/**
* BackWPup_Admin
*/
final class BackWPup_Admin {
public $page_hooks = [];
<?php
/**
* Class for communicating with Dropbox API V2.
*/
final class BackWPup_Destination_Dropbox_API {
/**
* URL to Dropbox API endpoint.
*/
<?php
/**
* Class in that the BackWPup job runs
*/
final class BackWPup_Job {
const ENCRYPTION_SYMMETRIC = 'symmetric';
const ENCRYPTION_ASYMMETRIC = 'asymmetric';
#!/bin/bash
### Set Language
TEXTDOMAIN=virtualhost
### Set default parameters
action=$1
domain=$2
rootDir=$3
owner=$(who am i | awk '{print $1}')
apacheUser=$(ps -ef | egrep '(httpd|apache2|apache)' | grep -v root | head -n1 | awk '{print $1}')
<?php
use Inpsyde\BackWPup\Settings;
/**
* Class BackWPup_Page_Settings
*/
class BackWPup_Page_Settings {
/**
@cuongdcdev
cuongdcdev / DNS Prefetch domains
Created October 4, 2019 02:31 — forked from lukecav/DNS Prefetch domains
WP Rocket - Advanced Options Prefetch DNS requests
//maps.googleapis.com
//maps.gstatic.com
//fonts.googleapis.com
//fonts.gstatic.com
//ajax.googleapis.com
//apis.google.com
//google-analytics.com
//www.google-analytics.com
//ssl.google-analytics.com
//youtube.com
@cuongdcdev
cuongdcdev / verification.php
Created July 28, 2019 18:02 — forked from jxlwqq/verification.php
Input verification on front and back ends
<?php
protected function form()
{
$form = new Form(new ModelName);
$form->text('title')->rules('required')->required()->help('This field must be required');
$form->text('number')->rules('required|regex:/\d{3}/')->pattern('\d{3}')->help('This field must be three digits');
return $form;
}