if(document.getElementById("file-upload").value == "") {
alert("You need to attach resume");
return false;
}
if (isset($_FILES['file-upload']) && count($_FILES['file-upload']['error']) == 1 && $_FILES['file-upload']['error'][0] > 0)
{
// file not selected
}
elseif (isset($_FILES['file-upload']))
{
//this is just to check if isset($_FILE). Not required.
// file selected
/^(https?:\/\/)?(www\.)?github\.com\/[a-zA-Z0-9_]{1,25}$/igm
Enable mod-spelling module in apache server
a2enmod speling
service apache2 restart
Create an .htaccess file that includes the following lines:
rails new .
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
wget http://wordpress.org/latest.tar.gz && tar xfz latest.tar.gz | |
mv wordpress/* ./ | |
rmdir ./wordpress/ && rm -f latest.tar.gz | |
sudo chown -R www-data:www-data . |
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
echo -e "\n--- Add some repos to update our distro ---\n" | |
sudo add-apt-repository ppa:atareao/telegram | |
sudo add-apt-repository ppa:saiarcot895/myppa # apt-fast repo | |
echo -e "\n--- Updating packages list ---\n" | |
sudo apt-get update |
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
$.fn.scrollView = function() { | |
return this.each(function() { | |
$('html, body').animate({ | |
scrollTop: $(this).offset().top | |
}, 1000); | |
}); | |
} |
#!/bin/sh
GIT_PATH="/var/repos/project-name.git"
PROJECT_PATH="/var/www/project-name"
git --work-tree=$GIT_PATH --git-dir=$PROJECT_PATH checkout -f
Read more about Automatic Deployment using Git Hooks at CodeJets