Skip to content

Instantly share code, notes, and snippets.

View ojulianos's full-sized avatar
🌎
Working from world

Juliano Silva ojulianos

🌎
Working from world
View GitHub Profile
<?php
/**
* Created by PhpStorm.
* User: juliano
* Date: 07/09/18
* Time: 16:01
*/
namespace App\Controllers\Auth;
<?php
$sqlNotificacao = "(SELECT n.mensagem FROM notificacao n WHERE n.id_aluno = a.id_aluno ORDER BY id_notificacao LIMIT 1 ) AS notificacao";
$sqlAcademia = "(SELECT academia.nome FROM academia WHERE academia.id_academia = a.id_academia) as academia";
$sqlselect = "SELECT a.*, $sqlAcademia, $sqlNotificacao FROM aluno a WHERE a.id_aluno =:id_aluno LIMIT 1";
$stmt = $db->prepare($sqlselect);
$stmt->bindParam("id_aluno", $id_aluno, PDO::PARAM_INT);
$stmt->execute();
<?php
/*
Essa função deverá identificar quando a altura vem no formato double com ".",
caso venha retornará o mesmo formatado, caso não, deverá retornar o substr para que adicione o ponto
e depois converter o valor em float
*/
public function postPeso($request, $response)
{
@ojulianos
ojulianos / vhost.sh
Created January 1, 2019 22:55 — forked from mattmezza/vhost.sh
bash script to create virtual host vhost with apache httpd and CentOs 7
#!/bin/bash
# This script is used for create virtual hosts on CentOs.
# Created by alexnogard from http://alexnogard.com
# Improved by mattmezza from http://you.canmakethat.com
# Feel free to modify it
# PARAMETERS
#
# $usr - User
# $dir - directory of web files
# $servn - webserver address without www.
<div class="btn-group" data-toggle="buttons">
{{ $academia->matriz == 'S' ? true : false }}
<label class="btn btn-primary {{ $academia->matriz == 'S', ? 'active' : '' }}">
{!! Form::radio('matriz', 'S', $academia->matriz == 'S' ? true : false) !!} Sim
</label>
<label class="btn btn-primary {{ $academia->matriz == 'N', ? 'active' : '' }}">
{!! Form::radio('matriz', 'N' $academia->matriz == 'N', ? true : false) !!} Não
</label>
</div>
#include <Ultrasonic.h>
#define TRIGGER_PIN 12
#define ECHO_PIN 11
// motor um
int enA = 5;
int in1 = 6;
int in2 = 7;
// motor dois
#include <Ultrasonic.h>
#define TRIGGER_PIN 12
#define ECHO_PIN 11
// motor um
int enA = 5;
int in1 = 6;
int in2 = 7;
// motor dois
{
"requestedUrl": "https://mybelt.com.br/dashboard/login",
"finalUrl": "https://mybelt.com.br/dashboard/login",
"lighthouseVersion": "5.6.0",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.120 Safari/537.36",
"fetchTime": "2020-04-06T14:04:07.129Z",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.120 Safari/537.36",
"benchmarkIndex": 669
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Rede de Vantagens</title>
<meta charset="UTF-8">
<meta name="description" content="Descrição padrão da rede de vantagens">
<!doctype html>
<html class="no-js" lang="{{ shop.locale }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="{{ settings.color_button }}">
{%- if canonical_url != blank -%}
<link rel="canonical" href="{{ canonical_url }}">