Skip to content

Instantly share code, notes, and snippets.

@gilvaju
gilvaju / bash-set-and-unset-env-from-file.sh
Last active July 26, 2022 18:24 — forked from apolopena/bash-set-and-unset-env-from-file.sh
Set and unset environment variables from an .env file
# set environment vars from an .env file
export $(grep -v '^#' .myenvfile | xargs)
# unset environment vars from an .env file
unset $(grep -v '^#' .myenvfile | awk 'BEGIN { FS = "=" } ; { print $1 }')
schema {
query: query_root
mutation: mutation_root
subscription: subscription_root
}
"""whether this query should be cached (Hasura Cloud only)"""
directive @cached(
"""measured in seconds"""
ttl: Int! = 60
APP_NAME="Construtor fora de série"
APP_ENV=production
APP_KEY=
APP_DEBUG=true
APP_URL=https://parametric-budget-hgwyz.ondigitalocean.app
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
@gilvaju
gilvaju / Laravel on VestaCP.md
Created December 7, 2020 14:17 — forked from m4tlch/Laravel on VestaCP.md
Laravel web templates for VestaCP

I've made a new web template to make Laravel work easily on VestaCP, and so I wouldn't have to change my Laravel installation, if I ever wanted to deploy it elsewhere.

Each file should be put in /usr/local/vesta/data/templates/web/apache2

Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html

@gilvaju
gilvaju / laravel.stpl
Created December 7, 2020 14:17 — forked from inerba/laravel.stpl
Laravel template VESTACP
# /usr/local/vesta/data/templates/web/apache2/laravel.stpl
<VirtualHost %ip%:%web_ssl_port%>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %sdocroot%/public/
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
import model from 'genesis/support/model/index'
import { resource } from 'genesis/infra/services/http/resource'
/**
* @type {string}
*/
export const icon = 'lock_outline'
/**
* @type {string}
@gilvaju
gilvaju / Index.vue
Created November 13, 2017 19:24
layout extended
<template>
<q-layout ref="layout" v-model="sides" v-bind="{view, leftBreakpoint, reveal}" :class="classNames">
<q-toolbar slot="header" class="">
<slot name="header">
<q-btn flat @click="toggleLeft">
<q-icon name="menu"></q-icon>
</q-btn>
<q-toolbar-title>
{{ AppName }}
# to install php_pgqsl with asdf
PHP_CONFIGURE_OPTIONS="--with-pgsql --with-openssl=/usr/include/openssl" asdf install php 7.4.12
# Se você estiver usando um terminal gráfico como Terminal ou Terminix
# NÃO SE ESQUEÇA de editar o perfil para “Executar comando como shell
# de login / Run command as login shell”
# EM CONSTRUCAO, NAO EXECUTAVEL AINDA
# remove packages unecessary
sudo pacman -Rns $(pacman -Qtdq)
cd /tmp
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt update
sudo apt install google-chrome-stable
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt install -y nodejs