Skip to content

Instantly share code, notes, and snippets.

View denisshevchenko's full-sized avatar
🏠
Working from home

Denis Shevchenko denisshevchenko

🏠
Working from home
View GitHub Profile
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Test.WebDriver
firefoxConfig :: WDConfig
firefoxConfig = defaultConfig
main :: IO ()
{-# 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"
@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 |
nohup java -jar /nix/store/b730v2c97jaqv26cbq9aig9zhvsqgxbw-jenkins.war > /home/demo/jenkins/log 2>&1 &
# 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
info <- elemInfo element
result <- executeJS [JSArg info] "arguments[0].click();"
maybe (return ()) return result
nohup xvfb-run -a -n 100 -e /tmp/sanity-selenium-server.err selenium-server -port 4444 > /tmp/sanity-selenium-server.log 2>&1 &
  • Сферы применения: Веб-разработка, CLI, Анализ данных, Компиляторы/Интерпретаторы.
  • Сложность изучения: Трудно
  • Почему его стоит учить:
    • Не похож ни на один другой язык, позволяет писать очень красивый и компактный код.
    • Строгая статическая типизация с автоматическим выведением типов.
    • Великолепная поддержка параллельного и конкурентного программирования.
    • Кроссплатформенность и нативная компилируемость.
  • Почему его не стоит учить:
    • Относительно высокий порог вхождения ввиду сильных отличий от других языков.
  • Отсутствие продвинутых IDE.
nc -zv 127.0.0.1 80
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;