Skip to content

Instantly share code, notes, and snippets.

View gpedro's full-sized avatar

Gabriel Pedro gpedro

View GitHub Profile

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@gpedro
gpedro / autoequip_set.lua
Created August 2, 2020 22:41
auto equip set for otcv8
autoEquipWidgets = {}
local gpAutoEquipSet = addTab("EquipSet")
local slots = 4
for slot = 1, slots do
autoEquipWidgets[slot] = {
head = {},
armor = {},
legs = {},
boots = {}
@gpedro
gpedro / .env
Created November 28, 2018 21:49
Laravel Mail Alternativos
MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=longapikey
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="no-reply@example.xablau"
MAIL_FROM_NAME="robot | example.xablau"
MAIL_HOST_ALT=smtp.gmail.com
@gpedro
gpedro / WelcomeUserNotification.php
Created November 28, 2018 21:31
Notificação de acordo com o cadastro do usuário
<?php
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
@gpedro
gpedro / FallbackMailChannel.php
Created November 28, 2018 21:15
FallbackMailChannel para Laravel Notifications
<?php
namespace App\Channels;
use Illuminate\Mail\Mailer;
use Illuminate\Mail\Markdown;
use Illuminate\Mail\TransportManager;
use Illuminate\Notifications\Channels\MailChannel;
class FallbackMailChannel extends MailChannel
@gpedro
gpedro / web.xml
Created September 14, 2018 02:58
Configuração do Projeto - web.xml
<!-- adicionar dentro da tag web-app -->
<resource-ref>
<description></description>
<res-ref-name>jdbc/xablau</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
@gpedro
gpedro / context.xml
Created September 14, 2018 02:58
Configuração do Tomcat - context.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@gpedro
gpedro / persistence.xml
Created September 14, 2018 02:47
Configuração do Projeto - persistence.xml (antes)
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="Xablau">
<properties>
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/xablau" />
<property name="hibernate.connection.username" value="postgres" />
<property name="hibernate.connection.password" value="postgres" />
@gpedro
gpedro / persistence.xml
Last active September 14, 2018 02:48
Configuração do Projeto - persistence.xml (depois)
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="Xablau">
<!-- adicionar esta referencia ao jndi -->
<non-jta-data-source>java:comp/env/jdbc/xablau</non-jta-data-source>
<properties>
<!-- pode comentar ou excluir
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
@gpedro
gpedro / context.xml
Created September 14, 2018 02:46
Configuração do Projeto - context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- aqui você coloca aquelas credenciais de desenvolvimento que estavam em persistence.xml -->
<Resource name="jdbc/xablau" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/xablau"
username="postgres" password="postgres" />
</Context>