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
## git has a different solution to do this. First change the file you do not want to be tracked and use the following command: | |
git update-index --assume-unchanged FILE_NAME | |
## and if you want to track the changes again use this command: | |
git update-index --no-assume-unchanged FILE_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
## Drop (i.e. remove tables) | |
mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "drop table $table" DATABASE_NAME; done; | |
## Truncate (i.e. empty tables) | |
mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "truncate table $table" DATABASE_NAME; done; |
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
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL|E_STRICT); |
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
function getDocHeight(D) { | |
return Math.max( | |
Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), | |
Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), | |
Math.max(D.body.clientHeight, D.documentElement.clientHeight) | |
); | |
} |
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
function nl2br (str, is_xhtml) { | |
// * example 1: nl2br('Kevin\nvan\nZonneveld'); | |
// * returns 1: 'Kevin<br />\nvan<br />\nZonneveld' | |
// * example 2: nl2br("\nOne\nTwo\n\nThree\n", false); | |
// * returns 2: '<br>\nOne<br>\nTwo<br>\n<br>\nThree<br>\n' | |
// * example 3: nl2br("\nOne\nTwo\n\nThree\n", true); | |
// * returns 3: '<br />\nOne<br />\nTwo<br />\n<br />\nThree<br />\n' | |
var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br />' : '<br>'; | |
return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2'); |
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
## Deny All Access | |
Order deny,allow | |
Deny from all | |
## Here you can define an IP that is allowed access | |
## Allow from xxx.xxx.xxx.xxx | |
## --------------------------------------------------------------- ## | |
## Deny Access to Hidden Files and Directories |
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
#center{ | |
background: #CCC; | |
padding: 30px 100px; | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
white-space: nowrap; | |
transform: translate(-50%, -50%); | |
-webkit-transform: translate(-50%, -50%); |
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
SET FOREIGN_KEY_CHECKS=0; | |
SET FOREIGN_KEY_CHECKS=1; |
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
grep -rl "matchstring" dir/* | xargs sed -i 's/string1/string2/g' |
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
sudo fuser -k 9000/tcp |
OlderNewer