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 "LE Backup Wizard v2" | |
echo "Which directory would you like to backup?[\"n\" to abort]" | |
ls /srv/ | |
read name | |
if [ $name = n ] | |
then | |
echo "Aborted" |
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 "LE Database Backup Wizard v2" | |
echo "Which database would you like to backup? [\"n\" to abort]" | |
read database | |
if [ $database = n ] | |
then | |
echo "Aborted" | |
exit |
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
[mysqldump] | |
user=USERNAME | |
password=PASSWORD |
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 "Backup LE-CRAFT" | |
echo "Ensure you have set /save-off or /stop" | |
echo "Are you ready? [y/n]" | |
read execute | |
if [ $execute = y ] | |
then |
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
http-server -a localhost -p 1337 -c-1 -o |
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 "LE Tar and S3 Wizard v1" | |
echo "Which directory would you like to tar? [\"n\" to abort]" | |
ls /srv/lib/backups/dir/ | |
read file | |
if [ $file = n ] | |
then | |
echo "Aborted" |
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.create(data, function(err, user) { | |
if(err) { | |
console.log(err) | |
return false | |
} | |
waterlock.engine.attachAuthToUser({ | |
email: data.email, | |
password: data.password | |
}, user, function(err, user) { | |
sails.log('Added user ' + user.name) |
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
# To hide future changes | |
git update-index --assume-unchanged filepath | |
# To unhide changes | |
git update-index --no-assume-unchanged filepath |
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: http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/ | |
// Your app's root module... | |
angular.module('MyModule', [], function($httpProvider) { | |
// Use x-www-form-urlencoded Content-Type | |
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; | |
/** | |
* The workhorse; converts an object to x-www-form-urlencoded serialization. | |
* @param {Object} obj |
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 "apt-get update & upgrade wizard" | |
echo "Would you like to assume yes? [y/n]" | |
read input_force | |
if [ $input_force = y ] | |
then | |
force="--yes" | |
fi |
OlderNewer