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
| ## verifies if a service is running. If not, starts the service. | |
| service_search_string=Tardis | |
| function start(){ | |
| # code to start your service =) | |
| } | |
| function check(){ | |
| ps -ef | grep $service_search_string | grep -v grep |
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
| (define (square x) | |
| (* x x)) | |
| (define (sum-squares x y) | |
| (+ (square x) (square y))) | |
| (define (test-square) | |
| (= 144 (square 12))) | |
| (define (test-sum-squares) |
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
| RegEx: | |
| ^(\.?[a-z0-9]{3,9}(\.?[a-z]{2,3})*)$ | |
| Test: | |
| www.google.com | |
| Test: | |
| www.google.com.br | |
| Test: | |
| radio.uol.com.br |
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
| RegEx: | |
| (\d{5})-?(\d{3}) | |
| Test: | |
| 09930-360 | |
| Test: | |
| 09930360 | |
| Test: | |
| 09930 777 |
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
| RegEx: | |
| ^([-\.\s]?(\d{3})){3}[-\.\s]?(\d{2})$ | |
| Test: | |
| 345.753.428-40 | |
| Test: | |
| 345.753.422.99 | |
| Test: | |
| 123-543-667.54 | |
| Test: |
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
| RegEx: | |
| ^(\d{1,3})+(\.\d{3})*(,\d{2})$ | |
| Test: | |
| 10.000.234,07 | |
| Test: | |
| 12,89 | |
| Test: | |
| 3.765,35 | |
| Test: |
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
| RegEx: | |
| (^|\()?\s*(\d{2})\s*(\s|\))*(9?\d{4})(\s|-)?(\d{4})($|\n) | |
| Test: | |
| 11957375429 | |
| Test: | |
| 11 976546863 | |
| 11 976542345 | |
| 11 97654 9753 | |
| (11) 98765 1234 |
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
| cd ~/Downloads/ | |
| wget http://downloads.typesafe.com/play/2.2.3/play-2.2.3.zip?_ga=1.165836478.1853295521.1400617207 | |
| unzip -e ~/Downloads/play-2.2.3.zip?_ga=1.165836478.1853295521.1400617207 | |
| sudo mkdir -p /opt/scala/play/ | |
| sudo mv ~/Downloads/play-2.2.3 /opt/scala/play/ |