Skip to content

Instantly share code, notes, and snippets.

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

Jonhnatha Trigueiro joepreludian

🛰️
Working from home
  • Loka
  • Joao Pessoa PB
  • 09:31 (UTC -03:00)
View GitHub Profile
@joepreludian
joepreludian / fabfile.py
Created December 13, 2013 17:35 — forked from fiee/fabfile.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
@joepreludian
joepreludian / fabfile.py
Last active July 23, 2016 16:38
Simple Fabfile for django based apps deployment
# -*- encoding: utf8 -*-
from fabric.api import env, settings, cd
from fabric.contrib.files import exists
from fabric.operations import local, sudo, run, put
import os
# Default configurations
env.hosts = ['[email protected]']
@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 '%[email protected]' % email
@joepreludian
joepreludian / .pylintrc
Created January 26, 2015 19:04
Pylint rc file template for django projects. Ignores migrations and test suites.
[MASTER]
profile=no
persistent=yes
ignore=tests.py, urls.py, migrations
cache-size=500
[MESSAGES CONTROL]
# C0111 Missing docstring
# I0011 Warning locally suppressed using disable-msg
# I0012 Warning locally suppressed using disable-msg