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/bash | |
# MySQL root password | |
ROOTPASS="password" | |
TIMEZONE="Europe/Moscow" | |
MYSQLPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
SFTPPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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/bash | |
# MySQL root password | |
ROOTPASS='password' | |
TIMEZONE='Europe/Moscow' | |
MYSQLPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
SFTPPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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/bash | |
echo "Enter username" | |
read USERNAME | |
############## | |
echo "Updating MODx" | |
cd /var/www/$USERNAME/www/ |
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/bash | |
ROOTPASS="password" | |
echo "Enter username to delete:" | |
read USERNAME | |
mysql -uroot --password=$ROOTPASS -e "DROP USER $USERNAME@localhost" | |
mysql -uroot --password=$ROOTPASS -e "DROP DATABASE $USERNAME" | |
rm -f /etc/nginx/sites-enabled/$USERNAME.conf |
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
<?php | |
/* | |
* Copyright 2010-2013 by MODX, LLC. | |
* | |
* This file is part of xPDO. | |
* | |
* xPDO is free software; you can redistribute it and/or modify it under the | |
* terms of the GNU General Public License as published by the Free Software | |
* Foundation; either version 2 of the License, or (at your option) any later | |
* version. |
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
upstream backend-test {server unix:/var/run/php5-test.sock;} | |
server { | |
listen 80; | |
server_name ip; | |
root /var/www/test/www; | |
access_log /var/log/nginx/test-access.log; | |
error_log /var/log/nginx/test-error.log; | |
index index.php index.html; | |
rewrite_log on; |
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
<script type="text/javascript" language="JavaScript"> | |
jQuery(function($){ | |
$('#results').load('[[~43]]', { | |
action: 'field33', | |
parents: '3', | |
page: '1', | |
limit: '10', | |
//offset: '0' | |
//where: '{"Data.favorite":"1"}' | |
}); |
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
<div class="gallery" id="listsite"> | |
[[!getPageExt@my? | |
&toPlaceholder=`resList` | |
&element=`msProducts` | |
&parents=`3` | |
&depth=`0` | |
&includeContent=`1` | |
&showHidden=`1` |
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
/*! | |
// Infinite Scroll jQuery plugin | |
// copyright Paul Irish, licensed GPL & MIT | |
// version 1.5.110124 | |
// home and docs: http://www.infinite-scroll.com | |
// support for MODX with Ditto | |
// Usage | |
// [!Ditto? &parents=`2` &depth=`1` &tpl=`@FILE:assets/templates/site/chunks/article.html` &paginate=`1` &display=`5`!] |
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
<?php | |
$uri = $_SERVER['REDIRECT_URL']; | |
$ref = $_SERVER['HTTP_REFERER']; | |
$confirmationFields['uri'] = $uri; | |
$confirmationFields['ref'] = $ref; | |
$uri.="\n"; | |
$file=fopen("uri.txt", "a"); | |
fwrite ($file,"http://".$_SERVER['SERVER_NAME'].$uri); | |
fclose($file); |
OlderNewer