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
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
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
/* For devices with narrow screens, phones, tablets, etc. */ | |
#portal-column-one, | |
#portal-column-two, | |
#portal-column-content, | |
#portal-column { /* updated */ | |
clear: both; | |
width: 97.75%; | |
margin-left: -98.875%; | |
} |
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
#!/bin/sh | |
# This assumes you installed Plone on Nitrous.io using these instructions | |
# http://blog.dbain.com/2013/07/plone-quickstart-on-cloud-in-less-than.html | |
# download this file and run it with the following command | |
# sh plone-builddev.sh | |
echo "running buildout with default buildout.cfg" | |
~/plone433/zinstance/bin/buildout -c ~/plone433/zinstance/develop.cfg |
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
# spinner borrowed from http://fitnr.com/showing-a-bash-spinner.html | |
spinner() | |
{ | |
local pid=$1 | |
local delay=0.75 | |
local spinstr='|/-\' | |
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do | |
local temp=${spinstr#?} | |
printf " [%c] " "$spinstr" |
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 Products.CMFCore.utils import getToolByName | |
membership = getToolByName(app.mysite, 'portal_membership') | |
for member in membership.listMembers(): | |
print member.getProperty('id'), member.getProperty('fullname'), member.getProperty('email') |
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 Testing import makerequest | |
root = makerequest.makerequest(app) | |
site = root.mysite | |
admin = root.acl_users.getUserById('admin') | |
admin = admin.__of__(site.acl_users) | |
from AccessControl.SecurityManagement import newSecurityManager | |
newSecurityManager(None, admin) | |
from zope.site.hooks import setHooks |
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
<html lang="en" | |
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" | |
xmlns:tal="http://xml.zope.org/namespaces/tal" | |
xmlns:metal="http://xml.zope.org/namespaces/metal" | |
xmlns:i18n="http://xml.zope.org/namespaces/i18n" | |
metal:use-macro="here/main_template/macros/master" | |
i18n:domain="my.content"> | |
<body> |
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 Testing import makerequest | |
root = makerequest.makerequest(app) | |
site = root.mysite | |
admin = root.acl_users.getUserById('admin') | |
admin = admin.__of__(site.acl_users) | |
from AccessControl.SecurityManagement import newSecurityManager | |
newSecurityManager(None, admin) |
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
<html> | |
<head> | |
<title>Simplest HTML Page</title> | |
</head> | |
<body> | |
<h1 style="color: Red">My First HTML Page</h1> | |
<p>English Paragraph Goes Here. So You Can Learn That: | |
<ol> | |
<li style="color: Red">h1 Means Heading One</li> | |
<li>p Means Paragraph</li> |
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 Testing import makerequest | |
from AccessControl.SecurityManagement import newSecurityManager | |
from Products.CMFCore.utils import getToolByName | |
root = makerequest.makerequest(app) | |
site = root.mysite | |
admin = root.acl_users.getUserById('admin') | |
admin = admin.__of__(site.acl_users) | |
newSecurityManager(None, admin) |
OlderNewer