Skip to content

Instantly share code, notes, and snippets.

{
"attraction": "Attraction",
"attractionMap": "Map",
"attractionVisitAll": "Yout've visited",
"attractionVisitOf": "of",
"attractionVisitLocation": "locations",
"immersiveView": "View 360 Experience",
"teasureHunting": "AR Treasure Hunting",
"teasureHuntingStart": "Start Treasure Hunting",
"teasureHuntingTarget": "Target View",
@biscuitrainbow
biscuitrainbow / dht11.ino
Last active July 20, 2022 17:36
Water temp NTC & DHT11
#include "DHT.h"
DHT dht;
const int dhtPin = D0;
struct DhtValue {
float humidity;
float celcius;
float fahrenheit;
@biscuitrainbow
biscuitrainbow / default.prod.conf
Created January 26, 2022 05:04
Deployment config
server {
listen 80;
index index.php index.html
server_name kiccamtlearning.com;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: "Lato", sans-serif;
}
.sidenav {
CREATE TABLE `products` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`code` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`price` decimal(15,2) NOT NULL,
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `products_code_unique` (`code`),
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\User;
use Illuminate\Http\Request;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Client;
@extends('layouts.main')
@section('title', 'Payment - Result')
@section('content')
<main>
<table>
<tr>
<td><b>Price Exclude VAT</b></td>
<td><span class='blue'>::</span></td>
$data = $request->getParsedBody();
$price = (float)$data['price'];
$hasVat = @$data['hasVat'];
$hasTax = @$data['hasTax'];
$vat = $data['vat'];
$tax = $data['tax'];
if ($hasVat) {
if ($vat == 'included') {
$priceExcludeVat = $price * (100 / 107);
const ITEMS = [
[
'code' => 'PD001',
'name' => 'PHP & Javascript',
'categories' => ['CT001', 'CT002'],
'price' => 350.00,
],
[
'code' => 'PD002',
'name' => 'Javscript inaction',
<?php
namespace App\Services;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Http;
class LineMessagingService
{
public function push($to, $messages)