Skip to content

Instantly share code, notes, and snippets.

@danielstgt
danielstgt / MIGRATION.md
Last active January 7, 2025 11:48
Use Discord for Laravel Error Logging without 3rd party packages

Migration Guide

1) Get the webhook URL for your channel on Discord

Click on the channel settings icon and select integrations.

2) Create a new entry in your .env

LOG_DISCORD_WEBHOOK_URL=<insert-the-webhook-url-here>
@danielstgt
danielstgt / deploy.sh
Created December 18, 2024 00:23
bun install with frozen lockfile (recommended for production)
bun install --frozen-lockfile && bun run build
@danielstgt
danielstgt / README.md
Last active February 20, 2025 16:24
Umami installation/deployment and proxy

Proxy settings for the umami installation

    location / {
        proxy_pass http://127.0.0.1:3000;

        proxy_read_timeout     120;
        proxy_connect_timeout  40;
        proxy_redirect         off;
<template>
<svg>
<use :href="symbolId" />
</svg>
</template>
<script>
export default {
props: ['icon'],
<template>
<svg v-bind="svgAttributes" v-html="svgContent"></svg>
</template>
<script>
export default {
props: ['icon'],
data() {
return {
<template>
<svg
v-bind="svgAttributes"
v-html="svgContent"
>
</svg>
</template>
<script>
export default {
@danielstgt
danielstgt / app.css
Created February 11, 2022 09:22
CSS Home Bar Padding (Tailwind CSS)
@layer utilities {
.pb-safe {
padding-bottom: env(safe-area-inset-bottom);
}
}
@danielstgt
danielstgt / readme.md
Created February 4, 2022 19:03
Useful Redirect Headers

Useful Redirect Headers

Set a max age

Cache-Control: max-age=3600

The max-age=N response directive indicates that the response remains fresh until N seconds after the response is generated.

@danielstgt
danielstgt / AppServiceProvider.php
Created January 12, 2022 08:43
DB Query Logging with Laravel
namespace App\Providers;
use DB;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
{
"rules": {
"@PSR2": true,
"ordered_imports": {
"sort_algorithm": "length"
},
"array_syntax": {
"syntax": "short"
},
"no_unused_imports": true,