- select-css (CSS only) - http://filamentgroup.github.io/select-css/demo/
- fauxSelect - https://gist.github.com/philfreo/4afbf63f486a772c4a4c
- SelectBoxIt - http://gregfranko.com/jquery.selectBoxIt.js
- Select2 - http://ivaynberg.github.io/select2/
- Chosen - http://harvesthq.github.io/chosen/
- DropKick.js - http://robdel12.github.io/DropKick/
- Multiple Select - http://wenzhixin.net.cn/p/multiple-select/docs/
- multiselect.js - http://loudev.com/
- FancySelect - http://code.octopuscreative.com/fancyselect/
- Bootstrap-Select - http://silviomoreto.github.io/bootstrap-select/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# http://www.vnsecurity.net/t/length-extension-attack/ | |
# sha1 padding/length extension attack | |
# by rd@vnsecurity.net | |
# | |
import sys | |
import base64 | |
from shaext import shaext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def render_pdf_weasyprint(html): | |
from weasyprint import HTML | |
pdf = HTML(string=html.encode('utf-8')) | |
return pdf.write_pdf() | |
def render_pdf_xhtml2pdf(html): | |
"""mimerender helper to render a PDF from HTML using xhtml2pdf. | |
Usage: http://philfreo.com/blog/render-a-pdf-from-html-using-xhtml2pdf-and-mimerender-in-flask/ | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Mysql; | |
use strict; | |
use vars qw($school_name); | |
use vars qw($pass); | |
require "./cgi-lib.pl"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Method 1: simply use Highcharts built-in functionality (SVG -> Highcharts server -> PNG) | |
// Downside: won't work in webview native apps that don't handle the form response | |
highcharts.exportChart({ | |
filename: filename | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mimerender | |
mimerender.register_mime('pdf', ('application/pdf',)) | |
mimerender = mimerender.FlaskMimeRender(global_charset='UTF-8') | |
def render_pdf(html): | |
from xhtml2pdf import pisa | |
from cStringIO import StringIO | |
pdf = StringIO() | |
pisa.CreatePDF(StringIO(html.encode('utf-8')), pdf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04.5 | |
#Install newer version of Python 2.7 | |
RUN DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y software-properties-common \ | |
&& add-apt-repository -y ppa:fkrull/deadsnakes-python2.7 && apt-get update \ | |
&& apt-get install -y python2.7=2.7.12-1~trusty1 && rm -rf /var/lib/apt/lists/* |
The Close.io API allows you to connect your app or service directly to your data in Close.io to search your existing leads, add new leads, and much more. In this guide, we're going to look at a couple of examples of how to accomplish some basic tasks using the API so that you can get started integrating Close.io into your current apps and workflows.
https://app.close.io/api/v1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rest_client' | |
require 'json' | |
API_KEY = 'your api key here' | |
api_base = 'https://' + API_KEY + ':@api.close.com/api/v1/' | |
# get info about yourself | |
RestClient.get api_base+'me/' | |
# post a lead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PhantomJS program to generate a PNG based on stdin (e.g. SVG image) | |
// Example: curl http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg | phantomjs png.js > test.png && open test.png | |
/* | |
From Flask/Python: | |
import os | |
from subprocess import Popen, PIPE, STDOUT | |
p = Popen(['phantomjs', '%s/png.js' % os.path.dirname(os.path.realpath(__file__))], stdout=PIPE, stdin=PIPE, stderr=STDOUT) | |
out = p.communicate(input=svg.encode('utf-8'))[0] | |
strIO = StringIO.StringIO() | |
strIO.write(out) |
NewerOlder