This file has been truncated, but you can view the full file.
This file contains 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
Aug 08 06:30:07 vps695005 bash[27061]: [2021-08-08T04:30:07Z INFO isahc::handler] response dropped without fully consuming the response body, which may result in sub-optimal performance | |
Aug 08 06:30:07 vps695005 bash[27061]: [2021-08-08T04:30:07Z DEBUG isahc::handler] Failure writing output to destination | |
Aug 08 06:30:07 vps695005 bash[27061]: [2021-08-08T04:30:07Z DEBUG isahc::handler] stopped the pause stream! | |
Aug 08 06:30:07 vps695005 bash[27061]: [2021-08-08T04:30:07Z DEBUG isahc::handler] Connection #41 to host dagelijksestandaard.nl left intact | |
Aug 08 06:30:07 vps695005 bash[27061]: [2021-08-08T04:30:07Z DEBUG isahc::handler] Trying 65.19.128.94:443... | |
Aug 08 06:30:07 vps695005 bash[27061]: [2021-08-08T04:30:07Z DEBUG isahc::handler] handler; id=7 | |
Aug 08 06:30:07 vps695005 bash[27061]: [2021-08-08T04:30:07Z DEBUG isahc::handler] TLSv1.2 (IN), TLS change cipher, Change cipher spec (1): |
This file contains 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
named!(command<&str, &str>, | |
do_parse!( | |
com: take_until!(COMMAND_TERMINATOR) >> | |
tag!(COMMAND_TERMINATOR) >> | |
(com) | |
) | |
); |
This file contains 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
let s = "* * 5-7 1,2,5 8 sudo rm -rf /"; | |
assert_eq!( | |
CronItem::from_str(s).unwrap(), | |
CronItem { | |
minute: AllValues, | |
hour: AllValues, | |
day_of_month: Interval((5, 7)), | |
month: MultipleValues(vec![1, 2, 5]), | |
day_of_week: SingleValue(8), |
This file contains 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
pub struct CronItem { | |
pub minute: TimeItem, | |
pub hour: TimeItem, | |
pub day_of_month: TimeItem, | |
pub month: TimeItem, | |
pub day_of_week: TimeItem, | |
pub command: String, | |
} |
This file contains 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
pub enum TimeItem { | |
AllValues, | |
SingleValue(u8), | |
MultipleValues(Vec<u8>), | |
Interval((u8, u8)), | |
} |
This file contains 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
defmodule QuotesBot do | |
use Application | |
def start(_type, _args) do | |
import Supervisor.Spec, warn: false | |
children = [ | |
worker(QuotesBot.Polling.Server, []), | |
:poolboy.child_spec(:worker, poolboy_config()) | |
] |
This file contains 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
defmodule QuotesBot.Bot.Server do | |
use GenServer | |
alias QuotesBot.{Bot.Logic, Config} | |
def start_link(_) do | |
GenServer.start_link(__MODULE__, nil, []) | |
end | |
def handle_cast({:reply, update}, _state) do | |
update_id = Logic.reply(update) |
This file contains 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
defmodule QuotesBot.Polling.Server do | |
use GenServer | |
alias QuotesBot.{Polling.Logic, Config} | |
def start_link do | |
GenServer.start_link(__MODULE__, 0, name: __MODULE__) | |
end | |
def init(offset) do | |
schedule_polling() |
This file contains 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
defmodule QuotesBot.Polling.Logic do | |
alias QuotesBot.Config | |
alias QuotesBot.Bot.Server, as: ReplyServer | |
alias Nadia.Model.Update | |
@telegram_api Config.telegram_api | |
@spec poll(integer()) :: integer() | |
def poll(offset) do | |
offset | |
|> updates |
This file contains 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
Y = (lambda (f) | |
((lambda (x) (f (x x))) | |
(lambda (x) (f (x x)))) | |
(Y F) = ((lambda (x) (F (x x))) | |
(lambda (x) (F (x x)))) | |
= (F ((lambda (x) (F (x x))) (lambda (x) (F x x)))) | |
(Y F) = (F (Y F)) |
NewerOlder