This file contains hidden or 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
https://www.varnish-cache.org/installation/redhat | |
http://repo.varnish-cache.org/source/ | |
https://www.varnish-cache.org/docs/3.0/tutorial/starting_varnish.html | |
yum install pcre | |
yum install pcre-devel | |
wget http://repo.varnish-cache.org/source/varnish-3.0.0.tar.gz | |
tar xvzf varnish-3.0.0.tar.gz |
This file contains hidden or 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
language: python | |
python: 2.7 | |
env: | |
- TARGET=test | |
- TARGET=coverage.sh | |
- TARGET=python-validation.sh | |
# - TARGET=css-validation.sh | |
# - TARGET=js-validation.sh |
This file contains hidden or 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
#!/bin/sh | |
# update dynamic files in /var/www/zope3.pov.lt/py3/ | |
# /opt/ztk-py3-status/ is a checkout of https://github.com/mgedmin/ztk-py3-status | |
# /opt/ztk-py3-status/*.py require python3 | |
# sponge requires moreutils | |
# convert requires imagemagick | |
# dot and neato require graphviz | |
cache_dir=/stuff/pypi-cache |
This file contains hidden or 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 | |
import ConfigParser | |
import os | |
import sys | |
import tarfile | |
import urllib | |
SQLALCHEMY_VERSION = "0.8.0b2" | |
SQLALCHEMY_DIR = "SQLAlchemy-%s" % SQLALCHEMY_VERSION |
This file contains hidden or 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
""" | |
tiny script to convert a pandas data frame into a JSON object | |
""" | |
import json as json | |
def df_to_json(df, filename=''): | |
x = df.reset_index().T.to_dict().values() | |
if filename: | |
with open(filename, 'w+') as f: f.write(json.dumps(x)) |
This file contains hidden or 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
""" | |
Use with | |
bin/instance run export_skin_folder.py | |
This script will extract the portal_skins folder | |
named in SKINFODLER_NAME to the DEST directory | |
""" | |
import os | |
import sys | |
PLONE_PORTAL = 'Plone' |
This file contains hidden or 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
############################################################################## | |
# | |
# Copyright (c) 2006 Zope Foundation and Contributors. | |
# All Rights Reserved. | |
# | |
# This software is subject to the provisions of the Zope Public License, | |
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | |
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | |
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
This file contains hidden or 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
# Enable backports | |
echo "deb deb http://ftp.debian.org/debian/ wheezy-backports main" >> /etc/apt/sources.list | |
# System up-to-date | |
apt-get update && apt-get dist-upgrade | |
apt-get install sudo | |
# Install all packages we need (nginx will be installed later... see :156) | |
apt-get install -y \ | |
vim \ |
This file contains hidden or 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
rewimport httplib | |
import urlparse | |
# funcion que se encarga de obtener respuesta del estatus del servidor web | |
def get_server_status_code(url): | |
# descarga sólo el encabezado de una URL y devolver el código de estado del servidor. | |
host, path = urlparse.urlparse(url)[1:3] | |
try: | |
conexion = httplib.HTTPConnection(host) | |
conexion.request('HEAD', path) |
This file contains hidden or 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
# Copyright (c) 2013, Andrea Grandi and individual contributors. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, | |
# are permitted provided that the following conditions are met: | |
# | |
# 1) Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# | |
# 2) Redistributions in binary form must reproduce the above copyright notice, |