vagrant up
vagrant ssh
make install
make start
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
| web: bundle exec rails s | |
| job: bundle exec rails runner 'Delayed::Job.delete_all; Delayed::Worker.new.start' |
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
| (ns slack | |
| (:require [clj-http.client :as client] | |
| [clojure.data.json :as json])) | |
| (defn send-to-slack | |
| "Sends a simple message to slack using an 'incoming webhook'. | |
| url will be of form: https://myapp.slack.com/services/hooks/incoming-webhook?token=mytoken . | |
| (Exact url you should use will appear on the slack integration page) | |
| text will be any valid message. | |
| This implementation could be expanded if you wanted to specify channel, username, etc. |
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
| | * * | | |
| | * * | | |
| | * * | | |
| | * * * | | |
| | * * * | | |
| | * * * * | | |
| | * * * * * * * * | | |
| | * * * | | |
| | * * * * * * | | |
| | * * * * * * | |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| from enum import IntEnum, unique | |
| @unique | |
| class Priority(IntEnum): | |
| Lowest = 0 | |
| Low = 1 |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
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
| FROM hexlet/hexlet-base | |
| RUN apt-install python-pip python-dev | |
| RUN apt-install python3-pip python3-dev | |
| RUN pip3 install pytest | |
| ENV PYTHONDONTWRITEBYTECODE 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
| (defn solution | |
| [m] | |
| (->> m | |
| (map #(reduce + %)) | |
| (apply max))) | |
| (let [m [[1 2 3] | |
| [0 -1 2] | |
| [4 1 -2]]] | |
| (assert (= 6 (solution m)))) |
- GoogleChrome
- MacBook
- MacOS
- tachpad
- size
- retina screen
- battery uptime
- провод питания с магнитом
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
| s.split.map { |x| x.mb_chars.capitalize.to_s }.join(" ") |