Skip to content

Instantly share code, notes, and snippets.

@danielstgt
danielstgt / README.md
Last active November 10, 2024 23:19
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,
@danielstgt
danielstgt / app.css
Created December 25, 2021 02:01
CSS text rendering based on hover detection
/* is not a touch device */
@media (hover: hover) {
body { text-rendering: optimizeLegibility; }
}
/* is a touch device */
@media (hover: none) {
body { text-rendering: optimizeSpeed; }
}
@danielstgt
danielstgt / README.md
Last active August 15, 2024 15:47
Tailwind CSS JavaScript Modifier/Variant

Usage

Use a js or no-js variant depending on the availability of JavaScript, e.g. no-js:hidden or js:bg-blue-500.

Tailwind CSS Config

const plugin = require('tailwindcss/plugin');

module.exports = {