Skip to content

Instantly share code, notes, and snippets.

View sawirricardo's full-sized avatar
👋

Ricardo Sawir sawirricardo

👋
View GitHub Profile
@sawirricardo
sawirricardo / install_packages.sh
Last active August 17, 2024 03:13
go almost must use libraries
go get -u github.com/joho/godotenv;
go get -u github.com/a-h/templ;
go get -u github.com/manifoldco/promptui;
go get -u github.com/go-chi/chi/v5;
go get -u gopkg.in/gomail.v2;
go get -u github.com/amacneil/dbmate/v2/pkg/driver/postgres;
go get -u github.com/jackc/pgx/v5/pgxpool;
go get -u github.com/gorilla/sessions;
go get -u github.com/gorilla/csrf;
go get -u github.com/google/uuid;
@sawirricardo
sawirricardo / index.html
Created February 14, 2024 05:20
web libraries
<!DOCTYPE html>
<html>
<head>
<meta name="charset" content="utf-8"/>
<meta name="csrf-token" content={ CSRF(ctx) }/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/adminlte.min.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/unpoly.min.css"/>
@sawirricardo
sawirricardo / Dockerfile
Last active April 16, 2025 05:04
Deploy Laravel app to Coolify or any docker-compose deployment
# Versions
# https://hub.docker.com/r/serversideup/php/tags?name=8.4-fpm-nginx-alpine
ARG SERVERSIDEUP_PHP_VERSION=8.4-fpm-nginx-alpine
# https://github.com/minio/mc/releases
ARG MINIO_VERSION=RELEASE.2025-03-12T17-29-24Z
# https://github.com/cloudflare/cloudflared/releases
ARG CLOUDFLARED_VERSION=2025.2.0
# https://www.postgresql.org/support/versioning/
ARG POSTGRES_VERSION=17
@sawirricardo
sawirricardo / AppServiceProvider.php
Last active April 15, 2025 14:42
Better defaults for your laravel projects, inspired by Nuno Maduro
<?php
namespace App\Providers;
use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\URL;