Skip to content

Instantly share code, notes, and snippets.

@gnidustotalus
gnidustotalus / hide_html.htaccess
Created May 8, 2024 07:37 — forked from davidvandenbor/hide_html.htaccess
Apache: Hide HTML extension in URLs with htaccess
# This tag loads the rewrite module
<IfModule mod_rewrite.c>
# enable the rewrite engine
RewriteEngine On
# Set your root directory
RewriteBase /
# Remove the .html extension
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.html\ HTTP
RewriteRule (.*)\.html$ $1 [R=301]
@gnidustotalus
gnidustotalus / GoogleDriveServiceProvider.php
Created February 9, 2024 07:29 — forked from sergomet/GoogleDriveServiceProvider.php
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@gnidustotalus
gnidustotalus / index.js
Created October 18, 2023 13:27 — forked from acfatah/index.js
Quasar Vue Router Middleware Pipeline Example
// router/index.js
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
import middlewarePipeline from './middleware-pipeline'
Vue.use(VueRouter)
@gnidustotalus
gnidustotalus / load_dotenv.sh
Created August 28, 2023 06:48 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@gnidustotalus
gnidustotalus / settings.md
Created June 9, 2023 21:03 — forked from sibinx7/settings.md
Windows and Ubuntu Time conflicts

Content

  • Multiple Boot Systems Time Conflicts

  • Repair corrupted files on Windows 10

Multiple Boot Systems Time Conflicts

Operating systems store and retrieve the time in the hardware clock located on your motherboard so that it can keep track of the time even when the system does not have power. Most operating systems (Linux/Unix/Mac) store the time on the hardware clock as UTC by default, though some systems (notably Microsoft Windows) store the time on the hardware clock as the 'local' time. This causes problems in a dual boot system if both systems view the hardware clock differently.

The advantage of having the hardware clock as UTC is that you don't need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets.

@gnidustotalus
gnidustotalus / nginx-webp-sample.conf
Created May 23, 2023 10:18 — forked from uhop/nginx-webp-sample.conf
Serving WEBP with nginx conditionally.
user www-data;
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
@gnidustotalus
gnidustotalus / install_php_8_1.sh
Created April 26, 2023 06:19 — forked from DenisJunio/install_php_8_1.sh
Laravel - PHP 8.1 Extensions - Ubuntu
#!/bin/bash
sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt upgrade -y
sudo apt install php8.1 -y
sudo apt install php8.1-bcmath -y
sudo apt install php8.1-bz2 -y
sudo apt install php8.1-cli -y
sudo apt install php8.1-common -y
sudo apt install php8.1-curl -y
@gnidustotalus
gnidustotalus / readme.md
Created April 18, 2023 08:22 — forked from imsus/readme.md
How to use Tailwindcss forms to unocss

Usage

  1. Add unocss-forms.ts somewhere in your code (example src/styles/unocss-forms.ts)
  2. Reference unocss-forms in unocss.config.ts preflight key. See code below for further changes
  3. Reload dev server
// unocss.config.ts

import {
@gnidustotalus
gnidustotalus / nginxrewrite2.md
Created March 21, 2023 10:38 — forked from esfand/nginxrewrite2.md
Nginx Rewrite

Multiple environments

This document contains an explanation of how you can create and maintain multiple environments for your Quasar projects. It will be an expansion of the official documentation located here for Webpack and here for Vite. Bear in mind that this guide is applicable to both versions of Quasar.

1. step

Create a variables folder in the project root, with a parser.js file inside. This will allow you to have all environment related files in a single place, which will improve readability.

2. step