Skip to content

Instantly share code, notes, and snippets.

Diogo Simão diogosimao

  • Brazil
Block or report user

Report or block diogosimao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@diogosimao
diogosimao / intercooler.html
Created Mar 31, 2019 — forked from andybak/intercooler.html
Example of adding Django CSRF token in an page that POSTs using intercooler.
View intercooler.html
{% extends "custom_base.html" %}
{% block content %}
<form id="defaults" >
<input name="csrfmiddlewaretoken" type="hidden" value="{{ csrf_token }}">
</form>
<table>
{% for row in items %}
@diogosimao
diogosimao / through_relationships.py
Created Oct 30, 2018 — forked from jhgaylor/through_relationships.py
Example of using a through model in Django and filtering by a value on the custom through model.
View through_relationships.py
class A(models.Model):
things = models.ManyToManyField("B", through=ThroughModel)
class B(models.Model):
text = models.TextField()
class ThroughModel(models.Model):
a = models.ForeignKey(A)
b = models.ForeignKey(B)
extra = models.BooleanField()
@diogosimao
diogosimao / fields.py
Created Oct 4, 2018 — forked from dokterbob/fields.py
Email field with domain existence validation for Django.
View fields.py
import logging
logger = logging.getLogger(__name__)
# Note: we need dnspython for this to work
# Install with `pip install dnspython`
import dns.resolver, dns.exception
from django import forms
from django.utils.translation import ugettext as _
@diogosimao
diogosimao / part.md
Created Aug 23, 2018 — forked from oisobstudio/part.md
Django Pagination Server-Side Menggunakan DataTable
View part.md

myapp/views.py

import json

from django.views.generic import View
from django.http import HttpResponse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.db.models import Q
from django.core.serializers.json import DjangoJSONEncoder
@diogosimao
diogosimao / firefox-developer-edition.md
Last active Jun 11, 2018 — forked from mahammad/firefox-developer-edition.md
How To Install Firefox Developer Edition and create desktop icon
View firefox-developer-edition.md

Download

Source to download: link

Install

chose other install way

1. Open Terminal Ctrl+Alt+T Download Firefox Developer Edition tar file

@diogosimao
diogosimao / whatsapp_phone_enumerator_floated_div.js
Created Jun 6, 2018 — forked from LoranKloeze/whatsapp_phone_enumerator_floated_div.js
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
View whatsapp_phone_enumerator_floated_div.js
/****** I've created a Chrome extension from this script, take a look at https://github.com/LoranKloeze/WhatsAllApp ********/
// Was this script of any use for you? Please consider a donation. It has taken me a lot of time to figure this
// stuff out and to keep it up to date. Even $5 or $10 is very much welcome! :)
// Paypal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PHVYMCEVZNLPA
// Bitcoin: 1DTqXrfnQrUutj7bGtKuhc5hP2DhZLXMC8
/*
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
You can’t perform that action at this time.