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
Parse.Cloud.define('signIn', function (req, res) { | |
var email = req.params.email.toLowerCase(); | |
Parse.User.logIn(email, req.params.password).then(function (user) { | |
res.success(user); | |
}, function (error) { | |
if (error.code === Parse.Error.INVALID_SESSION_TOKEN) { | |
Parse.User.logOut(); | |
} |
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
$.ajax( { | |
type: 'POST', | |
url: 'http://localhost:1337/sendMail', | |
data: json, | |
dataType: 'json', | |
success: function () { | |
form.style.display = 'none'; | |
}, | |
error: function(jqXHR, textStatus, err) { //show error message | |
console.log('Error: '+textStatus+', err '+err); |
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
// helper method cut | |
var Push = { | |
/** | |
* | |
* @param message | |
* @param user | |
* @param data | |
*/ | |
sendToUser: function (message, user, data) { | |
var userQuery = new Parse.Query(Parse.User); |
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
This is ApacheBench, Version 2.3 <$Revision: 1748469 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking www.bws.aero (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests | |
Completed 500 requests |
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 data = { | |
username: 'something', | |
someothervar: 42 | |
}; | |
var promise = user.save(data, {useMasterKey: true}); |
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
Parse.Cloud.define('someFunction', function (req, res) { | |
// storage | |
var json = {}; | |
var q = new Parse.Query('SomeClass'); | |
q.find().then(function(someClassResults){ | |
json['someClassResults'] = someClassResults; | |
var q = new Parse.Query('SomeOtherClass'); | |
return q.find(); | |
}).then(function(someOtherClassResults) { |
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
In file /usr/home/deploy/z-gelezo.ru/library/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php on line: 119 | |
Stack trace: | |
#0 /usr/home/deploy/z-gelezo.ru/library/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(836): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(ErrorException), 'SELECT * FROM v...', Array) | |
#1 /usr/home/deploy/z-gelezo.ru/library/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(766): Doctrine\DBAL\Connection->executeQuery('SELECT * FROM v...', Array, Array) | |
#2 /usr/home/deploy/z-gelezo.ru/project/app/Cetera/Project/Listing.php(136): Doctrine\DBAL\Connection->fetchAll('SELECT * FROM v...', Array, Array) | |
#3 /usr/home/deploy/z-gelezo.ru/project/app/Cetera/Project/Listing.php(298): Cetera\Project\Listing->getList() | |
#4 /usr/home/deploy/z-gelezo.ru/project/app/Cetera/Project/Videos.php(39): Cetera\Project\Listing->getById('2') | |
#5 /usr/home/deploy/z-gelezo.ru/project/app/Cetera/Project/Listing.php(137): Cetera\Project\Vi |
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
!* | |
uploads/ | |
themes/* | |
!themes/gelezo | |
library/* | |
!library/composer.json | |
cms/* | |
!cms/widgets | |
!cms/include | |
cms/include/* |
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
# Install rvm system-wide | |
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) | |
# Update the packages | |
apt-get update | |
apt-get upgrade | |
apt-get install build-essential | |
# get the packages required by ruby | |
rvm pkg install zlib |
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
sudo swapon -s | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=256k | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
swapon -s |