- Зарплатные ожидания
- Whiteboarding
- Quicksort
- Разговор с HR
- Серая ЗП
- Большая премия
| # ================================================================================================== | |
| # | |
| # NOTICE | |
| # | |
| # This gist is no longer maintained. It was moved to repo: | |
| # | |
| # https://github.com/maratori/golangci-lint-config | |
| # | |
| # Full history and all v2 releases are preserved in the repo. | |
| # |
| 1) Install cloudflared using homebrew: | |
| brew install cloudflare/cloudflare/cloudflared | |
| 2) Create /usr/local/etc/cloudflared/config.yaml, with the following content | |
| proxy-dns: true | |
| proxy-dns-upstream: | |
| - https://1.1.1.1/dns-query | |
| - https://1.0.0.1/dns-query |
Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.
And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.
If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.
| #!/bin/bash | |
| DOCKER_PS_LINE=`docker ps | awk '{print $1,$2,$NF}' | grep -m 1 $1` | |
| CONTAINER_NAME=`echo $DOCKER_PS_LINE | awk '{print $2}'` | |
| CONTAINER_ID=`echo $DOCKER_PS_LINE | awk '{print $1}'` | |
| if [ -n "$CONTAINER_ID" ]; then | |
| echo "Logged in: $CONTAINER_NAME" | |
| docker exec -it $CONTAINER_ID bash | |
| else | |
| echo "No container found for query: '$1'" |
| # Solution 1 | |
| # Use only codes greater than 418, do not use common status codes 404, 402, 403, etc | |
| location /location1 { | |
| error_page 463 = @app; return 463; | |
| } | |
| # Solution 2 (drawbacks unknown) | |
| location /location2 { | |
| try_files /dev/null @app; | |
| } |
A running example of the code from:
- http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang
- http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.
| package Mojolicious::Plugin::Coro; | |
| use Mojo::Base 'Mojolicious::Plugin'; | |
| use Coro; | |
| use Mojo::IOLoop; | |
| # Wrap application in coroutine and reschedule main coroutine in event loop | |
| sub register { | |
| my ($self, $app) = @_; | |
| my $subscribers = $app->plugins->subscribers('around_dispatch'); |