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
| grep -v '^#' file | grep '\w' > new.file |
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
| import hashlib | |
| hashlib.md5(textToHash).hexdigest() |
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
| # get a random password from console using tr, dc, urandom | |
| tr -dc a-zA-Z0-9 < /dev/urandom | head -c 10 ; echo -en "\n" |
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
| # .---------------- minute (0 - 59) | |
| # | .------------- hour (0 - 23) | |
| # | | .---------- day of month (1 - 31) | |
| # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... | |
| # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat | |
| # | | | | | | |
| # * * * * * command to be executed | |
| * * * * * command --arg1 --arg2 file1 file2 2>&1 |
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
| dd count=1 bs=512 if=/dev/zero of=/dev/sdb && sync |
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
| iconv --verbose -f UTF-8 -t ISO-8859-1 input.txt > output.txt |
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
| command line | |
| --------------------------------- | |
| padrino g project achiever -d none -t rspec -s none -e erb -c none -m none -b | |
| padrino g controller Admin get:index get:new post:create | |
| padrino start #defaults, non daemonized | |
| padrino start -d -p 3000 -e development #daemonized, port 3000, specified env | |
| padrino | |
| padrino rake spec | |
| padrino rake routes |
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
| <?php | |
| $to = "[email protected]"; | |
| $subject = "test"; | |
| $body = "Body of your message here you can use HTML too. e.g. <br> <b> Bold </b>"; | |
| $headers = "From: Peter\r\n"; | |
| $headers .= "Reply-To: [email protected]\r\n"; | |
| $headers .= "Return-Path: [email protected]\r\n"; |
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
| # flush queue | |
| sendmail -q -v | |
| find /var/spool/mqueue/* -type f -exec grep -irl “domainname.com” {} \; -exec rm -vf {} \; | |
| # check queue | |
| mailq |
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
| ln -s /usr/sbin/cf-serverd /var/cfengine/bin/cf-serverd | |
| ln -s /usr/sbin/cf-monitord /var/cfengine/bin/cf-monitord |
OlderNewer