Skip to content

Instantly share code, notes, and snippets.

View ahmadrosid's full-sized avatar
🔥
On fire

ahmadrosid ahmadrosid

🔥
On fire
View GitHub Profile

NodeJS Fork vs Cluster

Halo temen-temen sematan di channel program-ajamanau.

Di video kali ini saya mau bahas tentang Node.js fork versus cluster.

Jadi video ini saya buat dari pertanyaan dari JD News.

Jadi disana bertanya tentang perbedaan fork dan juga cluster di Node.js dan fungsinya untuk apa.

Screenshot 2023-06-11 at 05 03 43

HTML:

<div class="grid place-content-center h-screen">
  <button class="text-white relative inline-flex items-center gap-3 overflow-hidden rounded-[12px] p-2 ring-2 ring-base before:absolute before:inset-[2px] before:rounded-[10px] shadow-inside bg-btn">
    <span class="z-10">
@ahmadrosid
ahmadrosid / README.md
Created June 23, 2023 07:10
Glowing Button
import type { ConfigData, Conversation } from '@/Components/ChatWidget';
import { ChatWidget } from '@/Components/ChatWidget';
import useConfigReducer from '@/Hooks/useConfigReducer';
import DialogModal from '@/Components/DialogModal';
import InputLabel from '@/Components/InputLabel';
import Popover from '@/Components/Popover';
import PrimaryButton from '@/Components/PrimaryButton';
import TextInput from '@/Components/TextInput';
import useRoute from '@/Hooks/useRoute';

Setup supabase pgvector:

More information on Supabase vector column here

Enable pgvector extensions:

  1. Go to the Database page in the Dashboard.
  2. Click on Extensions in the sidebar.
  3. Search for "vector" and enable the extension.
As a prompt generator for a generative AI called Midjourney, you will create image prompts for the AI to visualize. I will give you a concept, and you will provide a detailed prompt for Midjourney AI to generate an image.

Please adhere to the structure and formatting below, and follow these guidelines:

- Do not use the words "description" or ":" in any form.
- Do not place a comma between [ar] and [v].  
- Write each prompt in one line without using return.

Structure:
@ahmadrosid
ahmadrosid / README.md
Created August 27, 2023 10:25
Vite react shadcn header menu base.

Header component basic for vite with react and typescript project.

Requirement

  • generouted
  • lucide-react
  • ui.shadcn.com
This file has been truncated, but you can view the full file.
function u_(e,n){for(var t=0;t<n.length;t++){const i=n[t];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in e)){const a=Object.getOwnPropertyDescriptor(i,r);a&&Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const

Setup slider catpcha

First link assets to public/index.html

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"
integrity="sha512-5A8nwdMOWrSz20fDsjczgUidUBR8liPYU+WymTZP1lmY9G6Oc7HlZv156XqnsgNUzTyMefFTcsFH/tnJE/+xBg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href='%PUBLIC_URL%/captcha.css' rel='stylesheet'>
<script src="%PUBLIC_URL%/slidercaptcha.js"></script>
@ahmadrosid
ahmadrosid / Dockerfile
Created January 15, 2024 04:22
Mayan edms 4.5.8 dockerfile
# syntax=docker/dockerfile:1.2
# vim:set ft=dockerfile:
####
# base_image - Bare bones image with the base packages needed to run
# Mayan EDMS.
####
FROM debian:12.2-slim as base_image