Skip to content

Instantly share code, notes, and snippets.

View iamlucianojr's full-sized avatar
👨‍💻
If you want to go fast, go alone. If you want to go far, go with others.

Luciano Jr iamlucianojr

👨‍💻
If you want to go fast, go alone. If you want to go far, go with others.
View GitHub Profile
<?php
$sql = "SELECT * FROM bsw_usuario WHERE ds_login = '".$_SESSION['ses_login']."' AND ds_senha = '".$_SESSION['ses_senha']."'";
$db->query('Usuario', $sql);
$numRow = $db->num_rows('Usuario');
if($numRow == 0) echo "<script>top.location.replace('../_logoff/');</script>";
/** Qual exatamente o motivo dessa implementação? **/
if(!$_SESSION['ses_permissao'][$PASTALOCALBSW]) header('Location: ../' );
@iamlucianojr
iamlucianojr / gist:9b4f3a263289128e1017
Created November 19, 2014 16:34
Decimal round Javascript
// Closure
(function(){
/**
* Decimal adjustment of a number.
*
* @param {String} type The type of adjustment.
* @param {Number} value The number.
* @param {Integer} exp The exponent (the 10 logarithm of the adjustment base).
* @returns {Number} The adjusted value.
select * from bsw_transportadora t
cross join bsw_regiao r
left join bsw_produto_frete pf on (pf.cd_regiao = r.regiao and pf.cd_transportadora = t.cd_transportadora and pf.cd_produto = 6)
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@iamlucianojr
iamlucianojr / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
<?php
require 'recipe/common.php';
/*
* Servers
*/
// Set up production server
server('production-server', 'host.com')
->user('root')
@iamlucianojr
iamlucianojr / gist:9d2a12d08b2890851ff3
Created April 30, 2015 18:57
Oppen source project list
http://www.daveperrett.com/projects/
@iamlucianojr
iamlucianojr / gist:360f499c0dfc85e8cfd3
Last active August 29, 2015 14:21
Estudo em Sistemas operacionais
"Programa": {
"Processos": {
"definição": "Programa em execução",
"concorrencias": "Dois processos tentando gravar no mesmo arquivo"
"Escalonador": "Gerencia os processos na fila de processamento",
},
"Fork": {
"Definição": "Clona o processo"
}
"Memoria",
@iamlucianojr
iamlucianojr / wakeup
Last active May 10, 2016 11:02
Wake up reading
SOLID:
- Single responsability principle
- Open/Closed principle
- Liskov substituition principle
- Interface segregation principle
- Dependence inversion principle
Object Calisthenics:
- Only One Level Of Indentation Per Method
- Don't Use The ELSE Keyword
Never do again:
- Project withou version control, never.
- Local documents, google drive it.
-