create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
echo "This script requires superuser access to install packages." | |
echo "You will be prompted for your password by sudo." | |
# clear any previous sudo permission | |
sudo -k | |
# run inside sudo | |
sudo sh <<SCRIPT | |
# installing apache | |
echo ">>> Installing Apache2." |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
<virtualhost *:80> | |
ServerName app.com | |
ServerAlias www.app.com | |
DocumentRoot /var/www/nishant/blog | |
ErrorLog /var/log/apache2/blog_error_log | |
CustomLog /var/log/apache2/blog_access_log common | |
<Directory /var/www/nishant/blog> | |
AllowOverride All | |
</Directory> | |
</virtualhost> |
load 'deploy' | |
# ================================================================ | |
# ROLES | |
# ================================================================ | |
role :app, "173.203.86.155:22", {:primary=>true} | |
role :db, "173.203.86.155:22", {:primary=>true} |
mongodump --host localhost --port 27017 --db dbname --out dump_dir_name
mongodump --host localhost --port 27017 --db dbname --collection collectioname --out dump_dir_name
##To restore db mongorestore --host localhost --port 27017 dump_dir_name
#!/bin/bash -e | |
#### | |
# shlog is a bash script that allow you to record a shell session by logging | |
# command history and giving diff of edited files | |
#### | |
# User notes: | |
# - Install: | |
# Load the script using 'source shlog.bash' (add it to your .bashrc | |
# to load it automatically) |
What I did to disable local delivery. I'll be using the example.com domain.
Requirements:
<?php | |
function http_file_get_contents( $url ) { | |
$response = file_get_contents( $url ); | |
return $response; | |
} | |
?> |
<?php | |
class Curl { | |
/** | |
* cURL request method | |
* | |
* @var string | |
*/ | |
protected $_method = 'GET'; |
<?php | |
/** | |
* Class : RequestGenerator | |
* Type : Component | |
* @author Nishant Shrivastava <[email protected]> | |
*/ | |
class RequestGeneratorComponent extends CComponent { | |
/** |