Skip to content

Instantly share code, notes, and snippets.

View syafiqfaiz's full-sized avatar

syafiq faiz syafiqfaiz

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Todo App with Authentication</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Todo App with Authentication</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Todo App with Authentication</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Gallery with Search</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Gallery with Search</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
@syafiqfaiz
syafiqfaiz / index.html
Created January 28, 2025 15:08
placeholder json
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript DOM Manipulation Demo</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript DOM Manipulation Demo</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
@syafiqfaiz
syafiqfaiz / next_js_zero_downtime_deployment.sh
Created May 3, 2024 06:54
Shell script to deploy self hosted Nextjs using PM2
#!/bin/bash
set -e
# deploying new production
echo "Starting production deployment"
# copy all files from current production to the temp directory
echo "Copying files to production temp directory"
cp -r /var/www/your-app/* /var/www/your-app.temp | pv -lep -s $(du -sb /var/www/your-app | awk '{print $1}') >/dev/null
# turn on temporary app server
{
"info": {
"_postman_id": "86f8898b-d2a7-4c49-acc4-fdbda6d65450",
"name": "Kelas Programming. REST API basics: CRUD",
"description": "# 🚀 Get started here\n\nThis template guides you through CRUD operations (GET, POST, PUT, DELETE), variables, and tests.\n\n## 🔖 **How to use this template**\n\n#### **Step 1: Send requests**\n\nRESTful APIs allow you to perform CRUD operations using the POST, GET, PUT, and DELETE HTTP methods.\n\nThis collection contains each of these [request](https://learning.postman.com/docs/sending-requests/requests/) types. Open each request and click \"Send\" to see what happens.\n\n#### **Step 2: View responses**\n\nObserve the response tab for status code (200 OK), response time, and size.\n\n#### **Step 3: Send new Body data**\n\nUpdate or add new data in \"Body\" in the POST request. Typically, Body data is also used in PUT request.\n\n```\n{\n \"name\": \"Add your name in the body\"\n}\n\n ```\n\n#### **Step 4: Update the variable**\n\nVariables enable you to store and re
@syafiqfaiz
syafiqfaiz / exercise beserta jawapan.js
Last active February 25, 2024 04:12
latihan tambahan
const markah = [80, 99, 57, 40, 88, 39]
// kirakan purata
// // pseudocode
// // tambah semua, bahagi dengan bilangan
// let hasilTambahSemua = 0
// markah.forEach((nombor) => {
// hasilTambahSemua = hasilTambahSemua + nombor
// console.log(hasilTambahSemua)