Skip to content

Instantly share code, notes, and snippets.

View fredriclesomar's full-sized avatar
:electron:
Try Harder ..

.-.. --- ...- . -.-- --- ..- fredriclesomar

:electron:
Try Harder ..
View GitHub Profile
@fredriclesomar
fredriclesomar / back.php
Created October 14, 2025 08:39
backend-livechat
<?php
header('Content-Type: application/json');
$input = json_decode(file_get_contents('php://input'), true);
if (!isset($input['message']) || empty(trim($input['message']))) {
http_response_code(400);
echo json_encode(['error' => 'No message provided']);
exit;
}
@fredriclesomar
fredriclesomar / index.html
Last active October 14, 2025 08:40
frontend-livechat
<!DOCTYPE html>
<html>
<head>
<title>Live chatku</title>
<meta charset="UTF-8">
<style>
#hasil {
margin-top: 10px;
padding: 10px;
border: 1px solid #ccc;
@fredriclesomar
fredriclesomar / DuaArah-Vue.html
Last active October 19, 2021 12:35
Two-way Vue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Binding dua arah</title>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
@fredriclesomar
fredriclesomar / SatuArah-Vue.html
Last active October 19, 2021 12:35
One-way Binding Vue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Binding satu arah</title>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
@fredriclesomar
fredriclesomar / contact-form.blade.php
Created November 21, 2020 09:22
fredriclesomar/laravelstudent
<div>
<section class="relative py-6 bg-white bg-gray-200 min-w-screen animation-fade animation-delay">
<div class="container h-full max-w-5xl mx-auto overflow-hidden rounded-lg shadow">
@if ($success)
<div class="inline-flex w-full ml-3 overflow-hidden bg-white rounded-lg shadow-sm">
<div class="flex items-center justify-center w-12 bg-green-500">
</div>
<div class="px-3 py-2 text-left">
<span class="font-semibold text-green-500">Berhasil</span>
<p class="mb-1 text-sm leading-none text-gray-500">{{ $success }}</p>