Skip to content

Instantly share code, notes, and snippets.

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

Andi Syafrianda andipyk

🏠
Working from home
View GitHub Profile
@andipyk
andipyk / jev-model-sumopod.ipynb
Created October 21, 2026 12:57
JEV-model-sumopod.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Solution Type Advantages Disadvantages
Clerk SaaS Easy to integrate, supports multiple platforms (React Native, Next.js, etc.) Paid, vendor lock-in
BetterAuth Open-Source Flexible, TypeScript-based, supports own database Requires manual configuration
NextAuth (Auth.js) Open-Source Many OAuth integrations, can store data in a database Complex, not ideal for large-scale use
OpenAuth Open-Source Simple, can be self-hosted Only identity verification, no session management
StackAuth SaaS & Open-Source Alternative to Clerk, can be self-hosted Still new, potential bugs
WorkOS SaaS Suitable for enterpr
Product Name Price URL
Headphones $99 View
Keyboard $49 View
@andipyk
andipyk / calculator-style.css
Created September 10, 2024 15:12
modern-calculator.php
.calculator {
border-radius: 10px;
box-shadow: 0 0 40px 0px rgba(0, 0, 0, 0.15);
margin: 0 auto;
max-width: 15em;
overflow: hidden;
}
.calculator-display {
background-color: #222222;
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Order extends Model
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\CategoryResource\Pages;
use App\Filament\Resources\CategoryResource\RelationManagers;
use App\Models\Category;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
<?php
class ParentClass {
public function refresh() {
// Original behavior in the parent class.
}
}
class ChildClass extends ParentClass {
#[\Override]
public function refresh() {
<?php
interface ObsoleteInterface {
public function oldMethod();
}
class ModernClass implements ObsoleteInterface {
#[\Override]
public function oldMethod() {
// Method implementation, marked as override to signal intended compliance with the deprecated interface.
}
<?php
class BaseClass {
public function showMessage() {
return "Base message";
}
}
class DerivedClass extends BaseClass {
#[\Override]
public function showMessage() {
<?php
interface Formatter {
public function format(string $input): string;
}
trait DefaultFormatter {
#[\Override]
public function format(string $input): string {
// Default formatter simply returns the input as is.
return $input;