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 getAge(birth) { | |
ageMS = Date.parse(Date()) - Date.parse(birth); | |
age = new Date(); | |
age.setTime(ageMS); | |
ageYear = age.getFullYear() - 1970; | |
return ageYear; | |
} |
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
define('FS_METHOD', 'direct'); | |
add this line to stop wordpress asking for ftp while installing on localhost |
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
ownershop | |
-- chmod / chgrp | |
permission | |
-- files & folder | |
-- chmod | |
-- octal | |
-- umask | |
special permissons |
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, | |
--fgrep, | |
--egrep | |
--regex | |
grep search through stream | |
syntax | |
grep [string to find] [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
wildcards or globbing | |
x -- anything | |
? -- any single character | |
! -- not(stuff) | |
[ac] -- a,c | |
[a-c] -- a,b,c | |
find |
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
--- bash | |
enter the command | |
cat /etc/passwd | |
and you will see the list of all the user names and bash assigned to the user | |
Ex.kia:x:2000:2000:kia,,,:/home/kia:/bin/bash | |
each bash has it's configuration as well as global configuration | |
global configuration file is stored in |
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
dpkg | |
dpkg-reconfigure | |
APT | |
--apt-get , apt-cache | |
--configuration | |
aptitute | |
dpkg is the program is used to installing debian pacakages | |
dpkg -l firefox to see if firefox installed and the information about the firefox |
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
Lilo -- linux loader | |
grub -- grand unified boot loader | |
backup MBR -- | |
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
<?php | |
/* echo "<pre>"; | |
print_r($_POST); | |
echo "</pre>";*/ | |
//ini_set('display_errors', 'On'); | |
//set_error_handler("var_dump"); | |
/** | |
* function to filter sql injections and illegal characters inside the input |
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
RD /S /Q "%windir%\System32\GroupPolicyUsers" | |
RD /S /Q "%windir%\System32\GroupPolicy" | |
gpupdate /force |
NewerOlder