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
# Ignore everything # | |
** | |
!wp-content/ | |
wp-content/** | |
!wp-content/themes/ | |
!wp-content/plugins/ | |
wp-content/themes/** | |
wp-content/plugins/** | |
# Add two rules for each Theme or Plugin you want to 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
# Start | |
sudo /usr/local/mysql/support-files/mysql.server start | |
# Stop | |
sudo /usr/local/mysql/support-files/mysql.server stop | |
# Restart | |
sudo /usr/local/mysql/support-files/mysql.server restart |
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
du -sh directory_name /* Gives you the size of the directory*/ | |
ls -l filename /* Size of the file*/ | |
ls -l * /* Size of All the files in the current directory */ | |
ls -al * /* Size of All the files including hidden files in the current directory */ | |
ls -al dir/ /* Size of All the files including hidden files in the 'dir' directory */ | |
/*Including -h option (for Ex: ls -lh * or du -sh) will give you size in human readable format (Kb, MB etc..) */ |
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 truncateString(str, num) { | |
// Clear out that junk in your trunk | |
var trunStr = ""; | |
if (str.length>num){ //first checking wheter given string needs to truncated | |
if (num>3) { // check whether given num is bigger than 3 or not | |
trunStr = str.slice(0, num-3); //we need to take additional 3 from the ... | |
console.log(trunStr); |
NewerOlder