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
if [ -e /etc/sudoers.tmp -o "$(pidof visudo)" ]; then | |
echo $(pidof visudo) | |
echo "/etc/sudoers busy, try again later" | |
exit 1 | |
fi | |
cp -p /etc/sudoers /etc/sudoers.bak | |
cp -p /etc/sudoers /etc/sudoers.tmp | |
line="%wheel ALL=(ALL) ALL" |
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 urlparse | |
from selenium import webdriver | |
from django.test import TestCase | |
from django.conf import settings | |
from django.core.urlresolvers import reverse | |
class BackendsTest(TestCase): | |
def setUp(self): |
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
calvin$ python setup.py register | |
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' | |
warnings.warn(msg) | |
running register | |
running check |
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 provides these input on an existing web interface, say for example on "www.od-eon.com/deploy":- | |
* project name | |
* project's domain name | |
* and his email address | |
# PHASE 1: MASTER SERVER SET-UP | |
# linode server kernel build `bootstrapping` | |
# base package installation in the new machine instance | |
# root user, web user and git user creation |
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
[Unit] | |
Description=Cherokee Lightweight Web Server | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/cherokee.pid | |
ExecStart=/usr/sbin/cherokee -d -C /etc/cherokee/cherokee.conf | |
[Install] |
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
[Unit] | |
Description=Cherrypy | |
After=network.target | |
[Service] | |
ExecStart=/bin/su web -l -c "/bin/bash --login -c /var/www/[project name]/[project name]/cherrypy_server.sh" | |
[Install] | |
WantedBy=multi-user.target |
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
# An alternative approach which is more "systemd" native | |
[email protected]: | |
[Unit] | |
Description=cherrypy server on port %i | |
[Service] | |
WorkingDirectory=/... |
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
// Use "appendChild" on the CDATA node we created. | |
$placemarkDescriptionNode = $dom->createElement('description'); | |
$placemarkDescriptionCDATANode = $dom->createCDATASection(html_entity_decode($row['description'])); | |
$placemarkDescriptionCDATANode = $placemarkDescriptionNode->appendChild($placemarkDescriptionCDATANode); | |
// So we create a wrapper node, called "description". | |
// Then we create a node that will contain your "CDATA" that's stored in a variable (I get it straight from my database). |
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
[Unit] | |
Description=PostgreSQL database server | |
[Service] | |
Type=forking | |
SyslogIdentifier=postgres | |
PIDFile=/var/lib/postgres/data/postmaster.pid | |
# initdb script takes care for symlinking $PGROOT to /var/lib/postgres | |
ExecStartPre=/usr/lib/systemd/scripts/postgresql-initdb |
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
pacman -Syy --noconfirm | |
(echo n; echo Y) | pacman -S haveged | |
(echo n; echo Y) | pacman -S glibc --force | |
pacman -S pacman --noconfirm | |
haveged -w 1024 | |
pacman-key --init | |
pacman-key --populate archlinux # Manual intervention required | |
pkill haveged | |
pacman -Rs haveged --noconfirm | |
pacman -S base-devel --noconfirm |