Skip to content

Instantly share code, notes, and snippets.

View joepreludian's full-sized avatar
🛰️
Working from home

Jonhnatha Trigueiro joepreludian

🛰️
Working from home
View GitHub Profile
@joepreludian
joepreludian / history.py
Created February 12, 2014 02:34
History File patched to avoid unicodewarning. Enjoy!
#!/usr/bin/python -t
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
@joepreludian
joepreludian / select_rank.sql
Last active August 29, 2015 14:02
Exemplo de uma sql usando variáveis e Ranking
SET @rank = 0;
SELECT
*
FROM
(
SELECT
@rank :=@rank + 1 AS ranking,
id as chamado,
nome,
@joepreludian
joepreludian / view_preco_programa.sql
Last active August 29, 2015 14:02
Sql do aplicativo LUPANAR, desenvolvido em sala de aula para demonstracao da disciplina de banco de dados.
SELECT
t1.codprog,
t1.entradaprog,
t2.nomesuite,
coalesce((select
sum(t3.precoputa)
from
puta t3
where
t3.codputa in (
@joepreludian
joepreludian / 0_reuse_code.js
Created July 29, 2014 18:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@joepreludian
joepreludian / desafio1.md
Created August 27, 2014 18:59
Desafio para desenvolvimento #1

Desafio para desenvolvimento #1

Esse aplicativo visa a construção de uma simples lista de tarefas. Ela testará seus skills em javascript, assim como organização do código, versionamento e, mais importante, sua organização.

###Como a aplicação deveria se comportar? Crie, apenas no browser, um programa para colocar uma lista de tarefas. A lista de tarefas funcionará da seguinte forma:

  • Terá uma botão onde você pode adicionar uma nova nota e apagar notas selecionadas, este último desabilitado por padrão;
  • Na nota que será criada, ao ser apertado a tecla "Enter" o sistema salva essa nota e dá a oportunidade para criar outra nota, dando o foco para a nova nova;
@joepreludian
joepreludian / desafio2.md
Created August 29, 2014 18:30
Desafio para desenvolvimento #2

Desafio dev: Talentos v.1

O foco desse desafio é implementar um cadastro de talentos. Através dele iremos cadastrar alguns poucos dados de um candidato à uma vaga de trabalho.

##Funcionaria assim: O usuário entrará em uma pagina pedindo os seguintes dados:

  • Nome
  • Email
@joepreludian
joepreludian / email.py
Created September 16, 2014 16:43
Uma forcinha =P
import string
l, m, email = string.ascii_lowercase, [], ''
k = [4, 12, 0, 8, 11, 7, 4, 13, 17, 8, 16, 20, 4]
for key in k:
email += l[key]
print '%s@faciltecnologia.com.br' % email
@joepreludian
joepreludian / hello.txt
Created January 29, 2015 15:06
Hello Word da Zueira
Parabéns, jovem! Significa que fez tudo direitinho! Tá uma mocinha!
-Joey
@joepreludian
joepreludian / git_submodules_commands.md
Created March 27, 2015 10:15
Clonando submódulos - Fast Lane

Alguns comandos úteis do GIT

No seu projeto GIT, para adicionar um, ou mais, submódulos, faça:

$ git submodule add https://github.com/chaconinc/DbConnector

Isto irá adicionar um submódulo. No root do projeto será criado um arquivo .gitmodules.

Clonando projeto com submódulos

Normalmente o repositório, quando é clonado, não vem com os submódulos carregados por padrão.

@joepreludian
joepreludian / count.asm
Created April 28, 2015 13:23
Contando de 9 a 0 em assembly
ORG 000H //initial starting address
START: MOV A,#00001001B // initial value of accumulator
MOV B,A
MOV R0,#0AH //Register R0 initialized as counter which counts from 10 to 0
LABEL: MOV A,B
INC A
MOV B,A
MOVC A,@A+PC // adds the byte in A to the program counters address
MOV P1,A
ACALL DELAY // calls the delay of the timer