Skip to content

Instantly share code, notes, and snippets.

View chr0nu5's full-sized avatar
:octocat:
The gravitational pull of curiosity is infinite

John chr0nu5

:octocat:
The gravitational pull of curiosity is infinite
View GitHub Profile
message = ""
for key in request.POST.keys():
if key != "csrfmiddlewaretoken" and key != "copy" and key != "email":
message = message + key + ": " + request.POST.get(key) + "\r\n"
sender = "sendmail@kikoautos.com"
recipients = [request.POST.get("email")]
try:
send_mail(subject, message, sender, recipients)
@chr0nu5
chr0nu5 / settings.py
Created June 11, 2014 13:45
Configuração Atual de Data
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Django settings for kikoautos project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
$('#cep').blur(function(){
var zip = $(this).val();
zip = zip.replace('-','').replace('.','');
$.ajax({
url:'http://cep.urldaapi.com.br/'+zip+'.json',
type: "GET",
cache: false,
dataType: "text",
crossDomain: true,
success:function(data){
settings.py
FILES_WIDGET_TEMP_DIR = 'temp/files_widget/'
FILES_WIDGET_FILES_DIR = 'uploads/files_widget/'
THUMBNAIL_DEBUG = True
PROJECTNAME = os.path.dirname(__file__)
MEDIA_ROOT = os.path.join(PROJECTNAME, 'media')
MEDIA_URL = '/media/'
function CalcularAzimuteMagnetico(satlong, eslat, eslong) {
var longdiffr, esCalcularAzimute, latit, longi, a, b, pl, pr, u1, u2, um, esCalcularAzimutem, dev, c;
longdiffr = (eslong - satlong) / 57.29578;
if (eslat == 0) {
eslat = 0.01;
}
esCalcularAzimute = 180 + 57.29578 * Math.atan(Math.tan(longdiffr) / Math.sin((eslat / 57.29578)));
from django.db import models
from django.db.models import signals
def after_save_pergunta(sender, instance, **kwargs):
#enviar email aqui
pass
class Pergunta(models.Model):
nome = models.CharField(max_length=255)

Keybase proof

I hereby claim:

  • I am chr0nu5 on github.
  • I am chr0nu5 (https://keybase.io/chr0nu5) on keybase.
  • I have a public key whose fingerprint is F2C6 B77E 56EC 084E 18A8 B4BA BBE5 DE94 904B AFAE

To claim this, I am signing this object:

<Buffer 6b 8d 00 16 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
| | | | | |_ from here to the end, each user has a beat percent beat
| | | | |____ the percent beat
| | | |_______ the color to use based on the mood
| | |__________ which user (index) to change the color
| |_____________ initial byte
|________________ intiial byte
<Buffer 6b 8d 00 16 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
| | | | | |_ from here to the end, each use has a beat percent beat
| | | | |____ the percent beat
| | | |_______ the color to use based on the mood
| | |__________ which use (index) to change the color
| |_____________ initial bite
|________________ intiial bite
{
"user": "chr0nu5",
"beat": 56,
"color": [255,200,132]
}