Skip to content

Instantly share code, notes, and snippets.

View tajulasri's full-sized avatar
🏠
Working from home

espressoByte tajulasri

🏠
Working from home
View GitHub Profile
@tajulasri
tajulasri / sender-regex-router.js
Created July 9, 2023 03:39
Regex router for Mail delivery Zone
// Online Javascript Editor for free
// Write, Edit and Run your Javascript code using JS Online Compiler
const regexRules = [
{regexp: new RegExp('\\edu\\.my$'),sendingZone: 'testing-sending-zone'},
{regexp: new RegExp('\\gov\\.my$'),sendingZone: 'gov-sending-zone'}
];
const email = 'test@admin.gov.my';
@tajulasri
tajulasri / requirement.txt
Created February 28, 2020 03:03
project requirement
Booking requirement
{{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
{{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
{{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';
@tajulasri
tajulasri / dump.sh
Created December 6, 2018 16:21 — forked from andsens/dump.sh
Backup all MySQL databases into separate files
#!/bin/sh
## backup each mysql db into a different file, rather than one big file
## as with --all-databases. This will make restores easier.
## To backup a single database simply add the db name as a parameter (or multiple dbs)
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is
## Create the user and directories
# mkdir -p /var/backups/mysql/databases
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup
## Remember to make the script executable, and unreadable by others
@extends('layouts.argon.app')
@section('content')
<div class="container-fluid mt--7">
<div class="row" style="margin-top: 20px;">
<div class="col">
<div class="card shadow">
<div class="card-header border-0">
</div>
<div class="table-responsive">
<div class="col-md-12">
#!/bin/bash
sudo apt-get install -y python-software-properties
sudo apt-get install -y software-properties-common
sudo apt-get install -y nginx
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
apt-cache pkgnames | grep php7.2
<ion-header>
<ion-navbar>
<ion-title>
Apps Tajul Asri
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-list>
@tajulasri
tajulasri / MakeFormCommand.php
Created October 27, 2018 17:46
Laravel command for generate form bootstrap from tables attributes
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
class MakeFormCommand extends Command
{
@tajulasri
tajulasri / sample.php
Last active October 7, 2018 15:29
wc order param dynamic handler
$array = [
'buy-1' => [
'products' => [
[
'id' => 20,
'quantity' => 1
]
]
]
#!/bin/python
import requests
import time
import xlsxwriter
import sys
from random_useragent.random_useragent import Randomize
"""
API URL : http://wordoid.com/QueryHandler.ashx?_=0.2528023694537982&domainAvailability=0&language=1&maxLength=5&pattern=*pay&quality=4