Skip to content

Instantly share code, notes, and snippets.

View joesoeph's full-sized avatar

Yusuf Fazeri joesoeph

View GitHub Profile
@joesoeph
joesoeph / notes.md
Created April 21, 2024 03:58
PrismaClient Not Found When Using PNPM

PrismaClient Not Found When Using PNPM

After setup prisma using PNPM in your project by following this official prisma setup. You getting error by import PrismaClient like below:

image

Before jump to the solution, this is my schema.prisma config file:

@joesoeph
joesoeph / create.tsx
Created March 14, 2024 03:25
Handle Calculation Field Items Using Ant Design Component.
import { parseForm } from '@formdata-helper/remix';
import type { ActionFunctionArgs, LoaderFunctionArgs, MetaFunction } from '@remix-run/node';
import { json } from '@remix-run/node';
import { useActionData, useLoaderData, useNavigation, useRouteError, useSubmit } from '@remix-run/react';
import { Button, Col, DatePicker, Form, Input, InputNumber, Row, Select, Switch, message } from 'antd';
import { useState } from 'react';
import { ChevronLeft, PlusCircle, SendFill, XLg } from 'react-bootstrap-icons';
import BreadcrumbPage from '~/components/BreadcrumbPage/BreadcrumbPage';
import ButtonNavigate from '~/components/ButtonNavigate';
import GlobalError from '~/components/GlobalError';
@joesoeph
joesoeph / vercel.json
Created February 7, 2024 07:32
Avoiding 404 vercel CSR for direct URL
{
"rewrites": [
{ "source": "/(.*)", "destination": "/" }
]
}
@joesoeph
joesoeph / CustomInput.tsx
Last active January 29, 2024 08:50
This is example custom input field antd component. For more detailed about custom input field, you can visit: https://ant.design/components/form#components-form-demo-customized-form-controls
import { Input } from 'antd';
import React, { useEffect, useState } from 'react';
interface PriceInputProps {
value?: number;
onChange?: (value: number) => void;
}
const CustomInput: React.FC<PriceInputProps> = ({ value = 0, onChange }) => {
const [number, setNumber] = useState(0);
@joesoeph
joesoeph / header_http_status_codes.php
Created February 28, 2023 01:30 — forked from phoenixg/header_http_status_codes.php
PHP header() for sending HTTP status codes
<?php
/*
参考自:
http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function
http://snipplr.com/view/68099/
*/
function HTTPStatus($num) {
$http = array(
@joesoeph
joesoeph / breakpoint_vuetify_tailwind.txt
Created February 21, 2023 15:44
Example Responsive Breakpoint Using Vuetify And Tailwind
<v-row>
<v-col cols="12">
<div class="red d-flex d-sm-none">XS</div>
<div class="green d-none d-sm-flex d-md-none">SM</div>
<div class="blue d-none d-md-flex d-lg-none">MD</div>
<div class="yellow d-none d-lg-flex d-xl-none">LG</div>
<div class="pink d-none d-xl-flex">XL</div>
</v-col>
<v-col cols="12">
@joesoeph
joesoeph / wakanda-spec.yml
Last active November 21, 2022 03:13
KK Tech Assessment
openapi: 3.0.0
info:
description: "Karyakarsa Tech Test Assessment - SMKN 1 Wakanda API Specification"
version: 1.0.0
title: SMKN 1 Wakanda API Specification
contact:
email: yusuf@wakanda.sch.id
servers:
@joesoeph
joesoeph / fedora36-fresh-install.md
Last active October 10, 2022 02:07
Easy Guideline to Start Fedora 36 for Web Development

Easy Guideline to Start Fedora 36 for Web Development

Update the System

sudo dnf update

Enable Access to Both Free & Non Free Repository

Fedora installer provides a method to enable additional third-party repositories for convenience. You should also get a prompt to do it in the Software Center.

sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

<?php
$arr = ["a", "about", "an", "are", "as", "at", "be", "by", "com", "de", "en", "for", "from", "how", "i", "in", "is", "it", "la", "of", "on", "or", "that", "the", "this", "to", "was", "what", "when", "where", "who", "will", "with", "und", "the", "www"];
<?php
$arr = ["a's", "accordingly", "again", "allows", "also", "amongst", "anybody", "anyways", "appropriate", "aside", "available", "because", "before", "below", "between", "by", "can't", "certain", "com", "consider", "corresponding", "definitely", "different", "don't", "each", "else", "et", "everybody", "exactly", "fifth", "follows", "four", "gets", "goes", "greetings", "has", "he", "her", "herein", "him", "how", "i'm", "immediate", "indicate", "instead", "it", "itself", "know", "later", "lest", "likely", "ltd", "me", "more", "must", "nd", "needs", "next", "none", "nothing", "of", "okay", "ones", "others", "ourselves", "own", "placed", "probably", "rather", "regarding", "right", "saying", "seeing", "seen", "serious", "she", "so", "something", "soon", "still", "t's", "th", "that", "theirs", "there", "therein", "they'd", "third", "though", "thus", "toward", "try", "under", "unto", "used", "value", "vs", "way", "we've", "weren't", "whence", "whereas", "whether", "who's", "why", "within", "wouldn't", "you'll",