Skip to content

Instantly share code, notes, and snippets.

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

AriffAzmi AriffAzmi

🏠
Working from home
View GitHub Profile
@AriffAzmi
AriffAzmi / parallel-test.php
Created October 19, 2020 10:15
Sample parallel test for php
<?php
try {
$db = new PDO('mysql:host=127.0.0.1;dbname=parallel_test', '', '');
$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$requested_stock = (int) $_REQUEST['requested_stock'];
$item_id = (int) $_REQUEST['id'];
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<meta name="generator" content="">
<title>Design GPCV</title>
<!-- Bootstrap core CSS -->
{
"id": 4304858284184,
"admin_graphql_api_id": "gid://shopify/Order/4304858284184",
"app_id": 580111,
"browser_ip": "118.100.17.147",
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": "fe0ea5cdde5766426f213eff87868555",
"checkout_id": 24768992510104,
@AriffAzmi
AriffAzmi / array-using-struct.go
Last active April 12, 2022 04:19
Create array using struct in golang
package main
import (
"encoding/json"
"fmt"
)
type Users struct {
Fullname string `json:fullname`
Phone int `json:phone`
NO PLATE LABEL
AHU1234 1
1234AHU 0
DCA123 1
123DCA 0
VBV1 1
1VBV 0
MKN1023 1
1023MKN 0
W101T 1