- Сферы применения: Веб-разработка, CLI, Анализ данных, Компиляторы/Интерпретаторы.
- Сложность изучения: Трудно
- Почему его стоит учить:
- Не похож ни на один другой язык, позволяет писать очень красивый и компактный код.
- Строгая статическая типизация с автоматическим выведением типов.
- Великолепная поддержка параллельного и конкурентного программирования.
- Кроссплатформенность и нативная компилируемость.
- Почему его не стоит учить:
- Относительно высокий порог вхождения ввиду сильных отличий от других языков.
- Отсутствие продвинутых IDE.
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Test.WebDriver | |
firefoxConfig :: WDConfig | |
firefoxConfig = defaultConfig | |
main :: IO () |
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Test.Hspec.WebDriver | |
import qualified Data.Text as T | |
checkCorrectnessOf :: Element -> WD () | |
checkCorrectnessOf email = do | |
emailText <- getText email | |
email `shouldBeTag` "a" |
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
@zalora.com.tw | |
Feature: Add some item in the cart and remove it | |
Background: | |
Given that I go to "zalora.com.tw" page | |
Scenario: search and add to cart | |
Then I search in the catalog: | |
| search-input | Octagon Slim Strap Watch | |
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
nohup java -jar /nix/store/b730v2c97jaqv26cbq9aig9zhvsqgxbw-jenkins.war > /home/demo/jenkins/log 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
# Rule: all outgoing requests to :80 -> 127.0.0.1:4444 | |
sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:4444 | |
# Rule: all outgoing requests to www.zalora.com.tw:80 -> 127.0.0.1:4444 | |
sudo iptables -t nat -A OUTPUT -p tcp -d www.zalora.com.tw --dport 80 -j DNAT --to-destination 127.0.0.1:4444 | |
# Delete these rules | |
sudo iptables -t nat -D OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:4444 | |
sudo iptables -t nat -D OUTPUT -p tcp -d www.zalora.com.tw --dport 80 -j DNAT --to-destination 127.0.0.1:4444 |
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
info <- elemInfo element | |
result <- executeJS [JSArg info] "arguments[0].click();" | |
maybe (return ()) return result |
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
nohup xvfb-run -a -n 100 -e /tmp/sanity-selenium-server.err selenium-server -port 4444 > /tmp/sanity-selenium-server.log 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
nc -zv 127.0.0.1 80 |
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
events { | |
worker_connections 1024; | |
} | |
http { | |
error_log /tmp/sanity-nginx-error.log; | |
access_log /tmp/sanity-nginx-access.log; | |
upstream secureZalora { | |
server 180.150.149.146:443; |