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/bash | |
TIME=`date +"%d-%m-%Y"` | |
FILENAME="backup-$TIME.tgz" | |
SRCDIR="/var/tekkit" | |
DESDIR="/var/tekkit_backup" | |
tar -cpzf $SRCDIR/$FILENAME $DESDIR |
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
img_sm : { type: String }, | |
content : { type: String }, | |
short : { type: String }, | |
group : { type: String }, /* add Group to DB */ | |
ext_link: { type: String }, | |
posted : { type: Date, index: true, default: Date.now }, | |
edited : { type: Date, default: Date.now }, |
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
var jade = require('jade'); | |
var Util = require("./Util"); | |
var PublicPages = module.exports = function PublicPages(){}; | |
PublicPages.prototype = { | |
db: null |
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
if (j != 8 || (d = -d && j = 0)) { | |
if (++y > 16) break; | |
x += d; | |
y -= d; | |
j++; | |
} |
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
// Includes | |
var crypto = require('crypto'); | |
function hashString(value) { | |
hash = crypto.createHash('sha1'); | |
hash.update(value); | |
return hash.digest('hex'); | |
} | |
var AdminPages = module.exports = function AdminPages(){}; |
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
function GetRFC822Date(oDate){ | |
// allow for empty request | |
if(typeof(oDate) == "undefined" || !oDate) oDate = new Date(); | |
//Pads numbers with a preceding 0 if the number is less than 10. | |
var LZ = function(val){ return (parseInt(val) < 10) ? "0" + val : val; } | |
/* accepts the client's time zone offset from GMT in minutes as a parameter. returns the timezone offset in the format [+|-}DDDD */ | |
var getTZOString = function(timezoneOffset){ |
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
// Includes | |
var crypto = require('crypto'); | |
function hashString(value) { | |
hash = crypto.createHash('sha1'); | |
hash.update(value); | |
return hash.digest('hex'); | |
} | |
var AdminPages = module.exports = function AdminPages(){}; |
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
// Includes | |
var crypto = require('crypto'); | |
function hashString(value) { | |
hash = crypto.createHash('sha1'); | |
hash.update(value); | |
return hash.digest('hex'); | |
} | |
var AdminPages = module.exports = function AdminPages(){}; |
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
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema | |
, ObjectId = Schema.ObjectId; | |
var Database = module.exports = function Database(){}; | |
Database.prototype = { | |
_collections: { | |
adminUser: { |
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
function project_add_user($var, $run = true){ | |
$expected = array('project_id' => '', 'id' => ''); | |
if(!cBasecamp::_checkVarTemplate($expected, $var, "project_del_user")) | |
return false; | |
if(!$run){ | |
cBasecamp::_schedule("project_add_user", "Add user to group", $var); | |
return true; | |
}elseif($run === true){ | |
// store then run with new taskid |