Skip to content

Instantly share code, notes, and snippets.

View ahmadrosid's full-sized avatar
🚀
On

ahmadrosid ahmadrosid

🚀
On
View GitHub Profile
@ahmadrosid
ahmadrosid / globe-animation-vanta-js.markdown
Created January 20, 2025 08:46
Globe animation - Vanta JS
@ahmadrosid
ahmadrosid / How to make something great.md
Created January 10, 2025 18:46
How to make something great

This article is bookmarked from: https://ryolu.notion.site/how-to-make-something-great

In the pantheon of creative endeavors—be it product design, art, architecture, software, or some hybrid creature of the mind—true greatness emerges not from any single stroke of genius, but from a careful cultivation of potential. There’s a quiet, almost mystical art to starting with something so unrefined that you’re unsure if it’s mud or marble, and patiently revealing its shape until others recognize its beauty. In the end, they’ll say: “Of course! It’s so obvious.” But what they see is only the final state. What you know is the hidden complexity—how the stone could have cracked and fallen to rubble at any misstep.

Begin with the Ambiguous Artifact

A truly fertile concept often resists immediate clarity. It’s a rough form: a half-lit corridor where you see only silhouettes and faint hints of what could be. Resist the urge to force early perfection. Instead, feel its potential: a spaciousness that can accommodate

Rust's lifetime

Imagine you have a toy box (memory):

  1. When you take out a toy (create a variable), Rust wants to know how long you're going to play with it

  2. The 'lifetime' is like a promise you make to Rust saying "I'll put the toy back when I'm done playing with it"

In your specific example about reading 100 bytes from a file:

  • It's like telling Rust "I'm borrowing these 100 bytes of information, and I promise to handle them carefully until I'm done using them"
@ahmadrosid
ahmadrosid / google-trend.js
Created November 15, 2024 17:40
Get google trend using selenium scripts.
const {Builder, By, Key, until} = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const options = new chrome.Options();
// Add headless mode configurations
options.addArguments('--headless'); // Run in headless mode
options.addArguments('--disable-gpu'); // Disable GPU hardware acceleration
options.addArguments('--no-sandbox'); // Bypass OS security model
options.addArguments('--disable-dev-shm-usage'); // Overcome limited resource problems

Menjawab pertanyaan dari group telegram ngooding

Untuk bisa jalankan project laravel di dalam subfolder laravel yg berjalan ada yg tau ?

Disini saya coba mau akses subdomain.domain.id/v2 untuk akses project latest nya.

Sudah coba2 atur Vhost Nginx masih belum berhasil. Siapa tau temen2 ada yg pernah mencoba.

Terimakasih

JavaScript/TypeScript Stack vs Laravel Ecosystem Comparison

Laravel Ecosystem JS/TS Equivalent or Potential Solution
1. Breeze Could be implemented with Remix templates
2. Cashier Potential for a custom solution using Stripe/Paddle APIs
3. Dusk Playwright or Cypress for E2E testing
4. Echo Socket.io or custom WebSocket solution
5. Envoyer CI/CD tools like GitHub Actions or custom scripts
6. Forge Cloud platforms like Vercel, Netlify, or custom server management
@ahmadrosid
ahmadrosid / Better Laravel Jetstream Team Invitations.md
Created August 1, 2024 11:08
Better Laravel Jetstream Team Invitations

Source: https://mariogiancini.com/making-laravel-jetstream-team-invitations-better

Making Laravel Jetstream Team Invitations Better | Mario Giancini

Tags: UX, PHP, Laravel, Code

Jetstream is a powerful package for Laravel that allows you to create a Team-based experience (Jetstream Teams) for your new web application. I've used it in several projects and the latest version 2.x has added a number of improvements that I appreciate.

The Problem With Team Invitations

curl --request POST \
  --url https://api.firecrawl.dev/v0/scrape \
  --header 'Authorization: Bearer fc-xxx' \
  --header 'Content-Type: application/json' \
  --data '{
	"url": "https://lwn.net/Articles/976822/",
	"pageOptions": {
		"includeHtml": true,
 "onlyMainContent": false
import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});

const response = await openai.chat.completions.create({
  model: "gpt-3.5-turbo",
 messages: [
@ahmadrosid
ahmadrosid / README.md
Last active May 12, 2024 13:35
Create your own github copilot.

Place your prompt in the ./prompts folder.

Install python dependencies:

pip install -r requirements.txt

Usage: