Skip to content

Instantly share code, notes, and snippets.

@zaelani23
Last active October 31, 2025 03:44
Show Gist options
  • Save zaelani23/d3dcdc765eab14c6a21ffa306e338108 to your computer and use it in GitHub Desktop.
Save zaelani23/d3dcdc765eab14c6a21ffa306e338108 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body onload="getLocation()">
<div class='container'>
<form>
<p class='h4 mb-4 text-center'>Klik 'Mulai' untuk melanjutkan!!</p>
<p>Aktifkan GPS SmartPhone kalian dan izinkan akses lokasi untuk mendapatkan unique id, silakan reload jika anda belum mengizinkan akses lokasi.</p>
<div class='form-group'>
<label for='ip'>IP Address:</label>
<?!= include(); ?>
</div>
<div class='form-group'>
<label for='unik'>Unique ID:</label><p>silakkan salin unique id anda untuk proses verifikasi jawaban anda nanti.</p>
<input type='text' class='form-control' id='unik' readonly>
</div>
<a type="button" class="btn btn-primary" href='GANTI DENGAN LINK GOOGLE FORM KALIAN' target='_blank'>Mulai</a>
</form>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script>
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
}
}
function makeid() {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for ( var i = 0; i < 7; i++ ) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
document.getElementById("unik").value = result;
return result;
}
function showPosition(position) {
google.script.run.processForm(makeid(),position.coords.latitude,position.coords.longitude);
}
</script>
</body>
</html>
@mholili403-lab
Copy link

<title>Halaman Web Pertamaku</title>

hallo, teman!

gabut bang hehe.

Kunjungi Google

@Vrandganteng
Copy link

<!doctype html>

<title>The Lost Forest — Demo</title> <style> html,body { margin:0; padding:0; height:100%; overflow:hidden; background:#000; } #gameCanvas { display:block; width:100vw; height:100vh; } /* joystick */ #joyBase { position: absolute; left: 16px; bottom: 16px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,0.06); touch-action: none; } #joyKnob { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.14); } /* top-right UI */ #ui { position: absolute; right: 12px; top: 12px; display:flex; gap:8px; align-items:center; } .btn { background: rgba(255,255,255,0.06); color: #fff; padding: 8px 12px; border-radius: 8px; font-family: sans-serif; font-size: 14px; user-select:none; -webkit-user-select:none; } #hint { position:absolute; left:50%; transform:translateX(-50%); bottom: 150px; color:#ddd; font-family: sans-serif; background: rgba(0,0,0,0.35); padding:6px 10px; border-radius:8px; display:none; } #title { position:absolute; left:12px; top:12px; color:#dfe; font-family:sans-serif; text-shadow:0 1px 6px rgba(0,0,0,0.7); } </style>
The Lost Forest — Demo
Collect
Items: 0
Dekati bola bercahaya untuk mengambilnya
<script src="https://unpkg.com/[email protected]/build/three.min.js"></script> <script> // Basic Three.js 3D exploration demo with virtual joystick // Scene setup const canvas = document.getElementById('gameCanvas'); const renderer = new THREE.WebGLRenderer({ canvas, antialias: true }); renderer.setPixelRatio(window.devicePixelRatio ? Math.min(window.devicePixelRatio, 2) : 1); renderer.setSize(window.innerWidth, window.innerHeight); const scene = new THREE.Scene(); scene.fog = new THREE.FogExp2(0x0b0f07, 0.03); // mysterious fog const camera = new THREE.PerspectiveCamera(65, window.innerWidth/window.innerHeight, 0.1, 1000); // Lights const hemi = new THREE.HemisphereLight(0x9bbf7f, 0x072028, 0.7); scene.add(hemi); const dir = new THREE.DirectionalLight(0xfff3b0, 0.6); dir.position.set(-5,10,2); scene.add(dir); // Ground (simple) const groundGeo = new THREE.PlaneGeometry(200,200, 8,8); const groundMat = new THREE.MeshStandardMaterial({ color: 0x183214, roughness:1 }); const ground = new THREE.Mesh(groundGeo, groundMat); ground.rotation.x = -Math.PI/2; ground.receiveShadow = true; scene.add(ground); // Add some simple "trees" (cylinders + cones) scattered function addTree(x,z,scale=1){ const trunk = new THREE.Mesh(new THREE.CylinderGeometry(0.2*scale,0.3*scale,2*scale,8), new THREE.MeshStandardMaterial({ color:0x4b2f1a })); trunk.position.set(x,1*scale, z); const leaves = new THREE.Mesh(new THREE.ConeGeometry(1.4*scale,3*scale,8), new THREE.MeshStandardMaterial({ color:0x0f5b2f })); leaves.position.set(x,2.2*scale, z); scene.add(trunk); scene.add(leaves); } for(let i=0;i<60;i++){ const x = (Math.random()-0.5)*140; const z = (Math.random()-0.5)*140; const s = 0.6 + Math.random()*1.2; addTree(x,z,s); } // Player (simple capsule made with cylinder+sphere) const player = new THREE.Group(); const bodyMat = new THREE.MeshStandardMaterial({ color: 0xcaa66a }); const cylinder = new THREE.Mesh(new THREE.CylinderGeometry(0.35,0.35,1.6,12), bodyMat); cylinder.position.y = 0.9; const head = new THREE.Mesh(new THREE.SphereGeometry(0.35,12,12), bodyMat); head.position.y = 1.6; player.add(cylinder); player.add(head); scene.add(player); // Camera offset following player const camOffset = new THREE.Vector3(0,2.6, -4.5); // Collectible: glowing orb const orbGeo = new THREE.SphereGeometry(0.35, 16, 16); const orbMat = new THREE.MeshStandardMaterial({ emissive:0x88ffcc, emissiveIntensity:1, color:0x003322 }); const orb = new THREE.Mesh(orbGeo, orbMat); orb.position.set(6,0.4, -5); scene.add(orb); // Light around orb const orbLight = new THREE.PointLight(0x76ffda, 1, 6); orbLight.position.copy(orb.position); scene.add(orbLight); // Movement variables let moveX = 0, moveZ = 0; const speed = 3.2; // units per second let collected = 0; // Simple ground collision clamp to keep inside area function clampPos(vec){ const limit = 90; vec.x = Math.max(-limit, Math.min(limit, vec.x)); vec.z = Math.max(-limit, Math.min(limit, vec.z)); } // UI const scoreEl = document.getElementById('score'); const colBtn = document.getElementById('colBtn'); const hint = document.getElementById('hint'); // Detect proximity to orb function checkProximity(){ const dist = player.position.distanceTo(orb.position); if(dist < 1.4 && orb.visible){ hint.style.display = 'block'; return true; } else { hint.style.display = 'none'; return false; } } colBtn.addEventListener('click', () => { if(checkProximity() && orb.visible){ orb.visible = false; orbLight.intensity = 0; collected++; scoreEl.textContent = 'Items: ' + collected; hint.textContent = 'Kamu menemukan artefak!'; setTimeout(()=> hint.style.display = 'none', 2000); } }); // Keyboard controls for desktop const keys = {}; window.addEventListener('keydown', (e) => { keys[e.key.toLowerCase()] = true; updateFromKeys(); }); window.addEventListener('keyup', (e) => { keys[e.key.toLowerCase()] = false; updateFromKeys(); }); function updateFromKeys(){ moveX = 0; moveZ = 0; if(keys['arrowup'] || keys['w']) moveZ = -1; if(keys['arrowdown'] || keys['s']) moveZ = 1; if(keys['arrowleft'] || keys['a']) moveX = -1; if(keys['arrowright'] || keys['d']) moveX = 1; } // Virtual joystick (simple) const joyBase = document.getElementById('joyBase'); const joyKnob = document.getElementById('joyKnob'); let activeTouchId = null; let baseRect = joyBase.getBoundingClientRect(); function resetKnob(){ joyKnob.style.transform = 'translate(-50%,-50%)'; moveX=0; moveZ=0; } resetKnob(); function onStart(e){ e.preventDefault(); baseRect = joyBase.getBoundingClientRect(); const t = e.changedTouches ? e.changedTouches[0] : e; activeTouchId = t.identifier ?? 'mouse'; handleMove(t.clientX, t.clientY); } function onMoveTouch(e){ e.preventDefault(); if(activeTouchId===null) return; const touches = e.changedTouches ? e.changedTouches : [e]; for(const t of touches){ if((t.identifier ?? 'mouse') === activeTouchId) handleMove(t.clientX, t.clientY); } } function onEndTouch(e){ e.preventDefault(); const touches = e.changedTouches ? e.changedTouches : [e]; for(const t of touches){ if((t.identifier ?? 'mouse') === activeTouchId){ activeTouchId = null; resetKnob(); } } } function handleMove(cx, cy){ const centerX = baseRect.left + baseRect.width/2; const centerY = baseRect.top + baseRect.height/2; const dx = cx - centerX; const dy = cy - centerY; const max = baseRect.width/2 - 10; const clampedX = Math.max(-max, Math.min(max, dx)); const clampedY = Math.max(-max, Math.min(max, dy)); joyKnob.style.transform = `translate(calc(-50% + ${clampedX}px), calc(-50% + ${clampedY}px))`; // Convert to movement (-1..1) moveX = clampedX / max; moveZ = clampedY / max; // down is positive, adjust later // invert Z so pushing up moves forward (negative Z) moveZ = moveZ; } joyBase.addEventListener('touchstart', onStart, {passive:false}); joyBase.addEventListener('touchmove', onMoveTouch, {passive:false}); joyBase.addEventListener('touchend', onEndTouch, {passive:false}); joyBase.addEventListener('mousedown', onStart); window.addEventListener('mousemove', onMoveTouch); window.addEventListener('mouseup', onEndTouch); // Animation loop let lastTime = performance.now(); function animate(now){ const dt = (now - lastTime)/1000; lastTime = now; // Movement mapping: joystick Y up => negative moveZ (forward). Our joystick returns +down, -up let vx = moveX; let vz = moveZ; // small deadzone if(Math.abs(vx) < 0.08) vx = 0; if(Math.abs(vz) < 0.08) vz = 0; // We'll interpret vz so that pushing up (negative dy) moves forward (negative z) // In our handleMove, moveZ is positive when dragging down; so invert: vz = -vz; // Move direction relative to camera forward const moveVec = new THREE.Vector3(vx, 0, vz); if(moveVec.lengthSq() > 0.0001){ moveVec.normalize(); // rotate moveVec by camera Y rotation so joystick is camera-relative const camY = camera.rotation.y; const q = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,1,0), camY); moveVec.applyQuaternion(q); // Update player position player.position.x += moveVec.x * speed * dt; player.position.z += moveVec.z * speed * dt; clampPos(player.position); // rotate player to face movement const targetDir = moveVec.clone(); targetDir.y = 0; targetDir.normalize(); const angle = Math.atan2(targetDir.x, targetDir.z); player.rotation.y = THREE.MathUtils.lerpAngle(player.rotation.y, angle, Math.min(1, 8*dt)); } // Camera follows behind player const desiredCamPos = player.position.clone().add(camOffset.clone().applyAxisAngle(new THREE.Vector3(0,1,0), player.rotation.y)); camera.position.lerp(desiredCamPos, 1 - Math.exp(-6 * dt)); const lookAt = player.position.clone().add(new THREE.Vector3(0,1.1,0)); camera.lookAt(lookAt); // Simple idle bob for orb orb.position.y = 0.4 + Math.sin(now*0.002)*0.12; orbLight.position.copy(orb.position); // update proximity hint checkProximity(); renderer.render(scene, camera); requestAnimationFrame(animate); } // initial positions player.position.set(0,0,0); camera.position.copy(player.position).add(camOffset); camera.lookAt(player.position); requestAnimationFrame(animate); // handle resize window.addEventListener('resize', () => { renderer.setSize(window.innerWidth, window.innerHeight); camera.aspect = window.innerWidth/window.innerHeight; camera.updateProjectionMatrix(); }); // basic touch-to-collect shortcut: double tap anywhere = try collect let lastTap = 0; window.addEventListener('touchend', (e) => { const t = performance.now(); if(t - lastTap < 350){ colBtn.click(); } lastTap = t; }); </script>

@alxyahmzh-hub
Copy link

<title>Sejarah Perkembangan Robot</title> <style> /* === Gaya Futuristik === */ body { font-family: 'Poppins', sans-serif; background-color: #0b0c10; color: #c5c6c7; margin: 0; padding: 0; overflow-x: hidden; }
/* Efek teks neon */
header h1 {
  color: #66fcf1;
  text-shadow: 0 0 10px #66fcf1, 0 0 20px #45a29e, 0 0 30px #45a29e;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 10px #66fcf1; }
  to { text-shadow: 0 0 30px #45a29e; }
}

header {
  background: linear-gradient(90deg, #0b0c10, #1f2833);
  text-align: center;
  padding: 60px 20px;
  border-bottom: 2px solid #45a29e;
}

header p {
  color: #c5c6c7;
  font-size: 1.2em;
  animation: fadeIn 2s ease;
}

section {
  max-width: 900px;
  margin: 40px auto;
  background: rgba(31, 40, 51, 0.9);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(102, 252, 241, 0.2);
  transform: translateY(40px);
  animation: floatUp 1s ease forwards;
}

@keyframes floatUp {
  to { transform: translateY(0); opacity: 1; }
}

h2 {
  color: #66fcf1;
  border-left: 5px solid #45a29e;
  padding-left: 10px;
}

img {
  width: 100%;
  border-radius: 10px;
  margin-top: 15px;
  box-shadow: 0 0 15px rgba(102, 252, 241, 0.3);
  transition: transform 0.5s;
}

img:hover {
  transform: scale(1.05);
}

/* Efek partikel latar belakang */
.particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  overflow: hidden;
}

.dot {
  position: absolute;
  width: 4px; height: 4px;
  background-color: #66fcf1;
  border-radius: 50%;
  opacity: 0.6;
  animation: move 10s linear infinite;
}

@keyframes move {
  0% { transform: translateY(0); }
  100% { transform: translateY(100vh); opacity: 0; }
}

footer {
  text-align: center;
  background-color: #1f2833;
  color: #c5c6c7;
  padding: 20px;
  font-size: 14px;
  border-top: 2px solid #45a29e;
  margin-top: 40px;
}
</style>
<script> for (let i = 0; i < 50; i++) { const dot = document.createElement('div'); dot.classList.add('dot'); dot.style.left = Math.random() * 100 + 'vw'; dot.style.animationDelay = Math.random() * 10 + 's'; dot.style.animationDuration = (5 + Math.random() * 5) + 's'; document.body.querySelector('.particles').appendChild(dot); } </script>

Sejarah Perkembangan Robot

Dari mesin sederhana hingga kecerdasan buatan modern

Awal Mula Robot

Konsep robot sudah dikenal sejak zaman kuno, ketika ilmuwan menciptakan mesin yang dapat bergerak sendiri. Pada abad ke-15, Leonardo da Vinci merancang robotic knight — manusia mekanik pertama di dunia.

Robot Leonardo da Vinci
<h2>Perkembangan di Abad ke-20</h2>
<p>Pada abad ke-20, istilah “robot” mulai populer lewat drama R.U.R karya Karel Čapek (1921). 
Setelah itu, robot digunakan dalam industri otomotif, elektronik, dan bahkan eksplorasi luar angkasa.</p>

<h2>Robot Modern dan AI</h2>
<p>Robot saat ini dilengkapi kecerdasan buatan (AI) yang memungkinkan mereka belajar, berbicara, dan beradaptasi. 
Contohnya adalah robot ASIMO dan Sophia yang bisa berinteraksi layaknya manusia.</p>
<img src="https://upload.wikimedia.org/wikipedia/commons/1/19/Humanoid_robot_ASIMO.jpg" alt="Robot modern ASIMO">

<h2>Masa Depan Robot</h2>
<p>Di masa depan, robot akan semakin dekat dengan kehidupan manusia — menjadi asisten rumah, tenaga kerja, bahkan penjelajah planet. 
Namun, kita tetap perlu memastikan teknologi ini digunakan untuk kebaikan dan kemanusiaan.</p>

© 2025 | Website oleh [Namamu]

@alxyahmzh-hub
Copy link

alya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment