Skip to content

Instantly share code, notes, and snippets.

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

Man Sarip mansarip

🏠
Working from home
View GitHub Profile
@mansarip
mansarip / info.md
Last active August 11, 2024 13:54
How to use PDFKit with Hono + Bun

How to use PDFKit with Hono + Bun

Full example

import { Hono } from "hono";
import PDFDocument from "pdfkit";

const app = new Hono();
@mansarip
mansarip / Inventory.js
Created November 19, 2021 21:26
Chuck's Trucks Inventory
import { useEffect, useState } from "react";
import db from "../firebase";
import styled from "styled-components";
import Truck from "../components/Truck/Truck";
import SideBar from "../components/SideBar/SideBar";
const Inventory = () => {
// setting inventory, filters, and default sortBy
const [loading, setLoading] = useState(true);
const [inventory, setInventory] = useState([]); // array of trucks
@mansarip
mansarip / masjid.json
Created June 18, 2020 08:22
Contoh Yang Aku Prefer Listing Masjid
{
"status": "ok",
"result": [
{
"title": "MASJID AL-IMAN DESA PUTRA",
"address": "Sepang",
"binatangKorban": "2 / 5",
"bahagianKorban": "15 / 30",
"negeri": "Selangor",
"image": "20.jpg"
@mansarip
mansarip / submit_with_jquery.php
Created June 16, 2020 13:58
Dapatkan Token Dari LocalStorage Dan Pass Ke PHP
<?php
if (isset($_POST['token'])) {
echo $_POST['token'];
exit;
}
?>
<!DOCTYPE html>
@mansarip
mansarip / sample_update_state_array.js
Created February 20, 2020 07:50
Clone array then update
// katakan ini original state
this.state = {
products: [
{
id: 1234,
name: "chicken",
amount: 100
},
{
id: 1235,
<h1>Salam Dari Timur</h1>
<p>Ini adalah contoh ayat dalam perenggan.</p>
<button>Hantar</button>