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
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
unxz wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar | |
mv wkhtmltox/bin/* /usr/local/bin/ | |
rm -rf wkhtmltox | |
rm -f wkhtmltox-0.12.4_linux-generic-amd64.tar |
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 requests | |
import sys | |
import json | |
def waybackurls(host, with_subs): | |
if with_subs: | |
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host | |
else: | |
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host |
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
Steps to Install Oracle Instant client and cx_Oracle on Fedora/CentOS/RHEL | |
1) Download Instant client from oracle website | |
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html | |
e.g. for Linux 86_64 | |
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html | |
Download | |
1) oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm |
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
# ALLOW USER BY IP | |
#<Limit GET POST> | |
# order deny,allow | |
# deny from all | |
# allow from 86.67.58.216 | |
# allow from 117.222.4.100 | |
#</Limit> | |
# BAN USER BY IP | |
<Limit GET POST> |
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 centos:centos6 | |
MAINTAINER [email protected] | |
# Apache | |
RUN yum install -y httpd httpd-devel | |
RUN chkconfig httpd on | |
RUN apachectl start | |
# Dependencies | |
RUN yum groupinstall -y "Development tools" |
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 django.db.models.signals import post_syncdb | |
from django.contrib.contenttypes.models import ContentType | |
from django.contrib.auth.models import Permission | |
def add_view_permissions(sender, **kwargs): | |
""" | |
This syncdb hooks takes care of adding a view permission too all our | |
content types. | |
""" | |
# for each of our content types |