Skip to content

Instantly share code, notes, and snippets.

View ubiratanlima's full-sized avatar

Ubiratan Lima ubiratanlima

View GitHub Profile
1) Se tiver o Docker instalado, remova!
2) Habilite o WSL no Windows 10
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
3) Habilitar o WSL para a versão 2
wsl --set-default-version 2
4) Instalar o Ubuntu na Microsoft Store
@ubiratanlima
ubiratanlima / instructions.txt
Created July 16, 2019 20:45 — forked from malkitsingh/instructions.txt
Step by step guide to install nominatim server
I followed these two blogs to install server
1. http://koo.fi/blog/2015/03/19/openstreetmap-nominatim-server-for-geocoding/#Compile_Nominatim
This explains ( and is the main blog which I followed) various steps
2. https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04
This explains how to setup swap files and install tiles if needed.
I will use Ubuntu 14.04 LTS as the platform. Just a basic install with ssh server. We will install Apache to serve http requests. Make sure you have enough disk space and RAM to hold the data and serve it efficiently. I used the Finland extract, which was about a 200 MB download. The resulting database was 26 GB after importing, indexing and adding Wikipedia data. The Wikipedia data probably actually took more disk space than the OSM data. My server has 4 GB RAM, which seems to be enough for this small data set.
1. Sofware requirements
<?php
namespace GES\Models;
use Bootstrapper\Interfaces\TableInterface;
use GES\Notifications\UserCreated;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements TableInterface
@ubiratanlima
ubiratanlima / ERROS.html
Created September 25, 2017 08:52
GES-SONEdu
Whoops, looks like something went wrong.
(3/3) ErrorException
Undefined variable: navbar (View: C:\Users\Ubiratan Lima\DEV\Gestao-Escolar\resources\views\layouts\app.blade.php) (View: C:\Users\Ubiratan Lima\DEV\Gestao-Escolar\resources\views\layouts\app.blade.php)
in 6933f8833b9ac9e81a2df8a18c23bf58c81de27a.php (line 55)
at CompilerEngine->handleViewException(object(ErrorException), 1)in PhpEngine.php (line 44)
at PhpEngine->evaluatePath('C:\\Users\\Ubiratan Lima\\DEV\\Gestao-Escolar\\storage\\framework\\views/e1b1fc6885e0d110c4997c33f3c4a527536811b4.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag)))in CompilerEngine.php (line 59)
at CompilerEngine->get('C:\\Users\\Ubiratan Lima\\DEV\\Gestao-Escolar\\resources\\views/auth/login.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag)))in View.php (line 137)
at View->getContents()in View.php (line 120)
@ubiratanlima
ubiratanlima / migration.php
Created May 1, 2017 21:49
Migration-add_field
class AddEmpresaIdTableRiscos extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('Riscos', function (Blueprint $table) {
@ubiratanlima
ubiratanlima / Empresa.php
Last active April 24, 2017 17:33
Duvidas Laravel
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Empresa extends Model
{
public function funcionarios()
{
QUERY("SELECT a.id, a.membro_id, a.cargosgrupo_id, pmais, pmenos, obsmsg, grupo_id, b.nivel
(SELECT nome from cargosgrupo where id = a.cargosgrupo_id) as nome_area,
(SELECT nome from usuario where id = a.membro_id) as nome_membro,
(SELECT nome from grupo where id = b.grupo_id) as nome_grupo,
SUM(pmais) AS totalPmais, SUM(pmenos) AS totalPmenos,
(SUM(pmais)-SUM(pmenos)) as percentual
FROM pontuacao a
INNER JOIN usuario b
ON a.membro_id = b.id
Where b.grupo_id = ".base64_decode($_SESSION['GRUPOID'])."