Skip to content

Instantly share code, notes, and snippets.

View wellingtonpgp's full-sized avatar
🎯
Focusing

Wellington Pereira Gonçalves wellingtonpgp

🎯
Focusing
View GitHub Profile

Stack

  • rails 4.2.5
  • ruby 2.3.0
  • sqlite

Comandos

Criar

 rails _4.2.5_ new agenda -> para criar agenda
git branch gh-pages
git push origin gh-pages
criar novo arquivo
add na master
git add .
git commit -m "teste"
git checkout gh-pages
git branch
*gh-pages
master
{
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"font_face": "Fira Code",
"font_size": 13,
"ignored_packages":
[
"Emmet",
"Vintage"
],
"line_padding_bottom": 3,
@wellingtonpgp
wellingtonpgp / Sublime Text 3 Build 3103 License Key - CRACK
Created April 30, 2017 01:10
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@wellingtonpgp
wellingtonpgp / aula.r
Created February 15, 2017 23:29
Aula de r dia 15/02/2017
## Dados
ict
sexo (1-masculino 2-feminino)
idade
1-administrativo 2-operacional
alcool
1-não fuma 2-fuma
22 1 33 1 3 1
36 1 21 2 2 1
25 1 29 1 1 1
@wellingtonpgp
wellingtonpgp / mensagens.js
Created January 7, 2017 15:48
Função para retornar mensagem com jquery e bootsrap
function msg(msg, tipo) {
var retorno = $('.retorno');
var tipo = (tipo === 'sucesso') ? 'success' : (tipo === 'alerta') ? 'warning' : (tipo === 'erro') ? 'danger' : (tipo === 'info') ? 'info' : alert('Informe a mensagem');
retorno.empty().fadeOut('fast', function () {
return $(this).html('<div class="alert alert-'+tipo+'">'+msg+'</div>').fadeIn('slow');
});
setTimeout(function () {
retorno.fadeOut('slow').empty();
}, 9000);
@wellingtonpgp
wellingtonpgp / myphpadmin.sql
Created November 15, 2016 15:06 — forked from renanlara/myphpadmin.sql
Atualizar as URLs no Banco de Dados do WordPress
UPDATE wp_options SET option_value = replace(option_value, 'http://url-antiga.com.br', 'http://url-nova.com.br') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://url-antiga.com.br','http://url-nova.com.br');
UPDATE wp_posts SET post_content = replace(post_content, 'http://url-antiga.com.br', 'http://url-nova.com.br');
@wellingtonpgp
wellingtonpgp / README.md
Created September 26, 2016 23:04 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

-Calculo da media usamos a função AVG
SELECT AVG(punicao) FROM campeonato
-COUNT
A função COUNT(*) retorna o número de registros em uma tabela:
SELECT COUNT(*) FROM nome_tabela
Sintaxe do SQL COUNT (DISTINCT nome_coluna)
SELECT COUNT(DISTINCT nome_coluna) FROM nome_tabela
Nota: COUNT (DISTINCT) trabalha com Oracle e Microsoft SQL Server.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>handerlerbars</title>
</head>
<body>
<h1>
<%=title%> in EJS
</h1>