Given
- I use a VPN to connect to my work network
- I'm on a Linux computer that uses systemd-resolved
- I have a work domain called
example.com example.comis hosted by both public and private DNS nameservers
| type ExcludeFunctions<T> = { | |
| // We need to map over the keys directly to preserve optionality. We filter with "as" | |
| [K in keyof T as T[K] extends Function ? never : K]: | |
| // Exclude undefined from the check to properly handle optional properties | |
| Exclude<T[K], undefined> extends Array<infer E> | |
| ? Array<ExcludeFunctions<E>> | |
| : Exclude<T[K], undefined> extends Record<string, any> | |
| ? ExcludeFunctions<T[K]> | |
| : T[K]; |
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes.
By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.
| #!/bin/bash | |
| # This script programmatically moves around the windows on my screens. | |
| # The JavaScript can be prototyped in Looking Glass (ALT+F2 lg). The documentation of MetaWindow can be found here: | |
| # https://developer.gnome.org/meta/stable/MetaWindow.html | |
| set -e | |
| if [ -z "$1" ]; then | |
| echo "Please give a configuration (1-5)." | |
| exit 1; | |
| fi |
| #!/usr/bin/perl | |
| use strict; | |
| my $action = ''; | |
| my $filename = '-'; | |
| for my $arg (@ARGV){ | |
| if ($arg eq "-e" or $arg eq "--export"){ | |
| $action = 'export'; |
Основная задача посмотреть насколько хорошо вы сможете разобраться с новыми технологиями в относительно короткий срок. В идеале, на него нужно потратить не более 3 дней. А так - делайте сколько делается, пока мы не закроем вакансию ;)
Нужно написать одностраничное приложения для просмотра фильмов с помощью The Movie Database API.
При открытии приложения, должен отображаться список популярных фильмов с пагинацией или динамической подгрузкой (на выбор). Также на странице должно быть поле для поиска. Когда ты вводишь туда какой-то текст, должны отобразиться фильмы которые ему соответствуют. Для каждого фильма в списке должен отображаться список жанров (названий жанров, не айдишек), к которым он принадлежит.
При клике на карточку с фильмом, должна быть показана страница с детальной информацией об этом фильме и списком рекоммендованых или похожих (можно и то, и то) фильмов к нему.
| // Usually I use this in my app's config file, in case I need to disable all cache from the app | |
| // Cache is from `js-cache`, something like `import Cache from 'js-cache';` | |
| const cacheable = true, | |
| cache = new Cache(); | |
| // On request, return the cached version, if any | |
| axios.interceptors.request.use(request => { | |
| // Only cache GET requests | |
| if (request.method === 'get' && cacheable) { |
| #!/bin/bash | |
| # Recursive file convertion windows-1251 --> utf-8 | |
| # Place this file in the root of your site, add execute permission and run | |
| # Converts *.php, *.html, *.css, *.js files. | |
| # To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command | |
| find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | | |
| while read file | |
| do |
| { | |
| "dicts": [ | |
| 1477390003288, | |
| [ | |
| [ | |
| 1, | |
| "вооружённый конфликт", | |
| [ | |
| [2, "война"], | |
| [3, "восстание"], |