Skip to content

Instantly share code, notes, and snippets.

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

Fajar Siagian fajar7xx

🏠
Working from home
View GitHub Profile
@architjn
architjn / debugging-process.mdc
Created June 9, 2025 06:52
Instructs Cursor to add debug logs, use browser tools for bug-fixing, remove logs after resolution, and make minimal changes.
---
description:
globs:
alwaysApply: true
---
# Debugging Rule for Bug-Fixing Requests
This rule ensures that when a user request involves solving a bug, Cursor adds minimal debug logs, leverages browser-based debugging tools, removes logs after resolution, and makes only the minimal changes necessary.
## Rule Instructions
<?php
namespace App\Http\Controllers\API;
class ResponseFormatter
{
protected static $response = [
'meta' => [
'code' => 200,
'status' => 'success',
@fajar7xx
fajar7xx / List.md
Created February 29, 2020 03:35 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@jeffochoa
jeffochoa / Response.php
Last active October 6, 2025 22:11
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@fgilio
fgilio / axios-catch-error.js
Last active June 18, 2025 11:09
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@zburgermeiszter
zburgermeiszter / import.sh
Created April 7, 2016 12:55
Import sql file to MariaDB in Docker
docker exec -i CONTAINER_ID /bin/bash -c "export TERM=xterm && mysql -proot -uroot database" < import.sql
@msurguy
msurguy / List.md
Last active June 30, 2025 00:13
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@ryansechrest
ryansechrest / php-style-guide.md
Last active October 20, 2025 07:37
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">