Skip to content

Instantly share code, notes, and snippets.

View oleksiilevzhynskyi's full-sized avatar

Oleksii Levzhynskyi oleksiilevzhynskyi

View GitHub Profile
@oleksiilevzhynskyi
oleksiilevzhynskyi / grammarly_web_frontend_resources.md
Last active November 28, 2023 12:23
Grammarly web front-end resources
/* https://www.npmjs.com/package/webpack-watch-livereload-plugin
* in webpack.config:
* new WatchLiveReloadPlugin({
* files: ['./dist']
* })
*
* somewhere in index.ts
* if (process.env.NODE_ENV === 'development') {
* require('./livereload')()
* }
#!/bin/sh
#
# Automatically adds ticket name to every commit message
# when branch name starts with "XX-00"
#
# Don't change message when it already contains any ticket name.#
#
# Don't do anything when in merge - https://git-scm.com/docs/githooks#_prepare_commit_msg
[ -f $GIT_DIR/MERGE_MSG ] && exit 0
@oleksiilevzhynskyi
oleksiilevzhynskyi / gist:896b2a2921e38d233c73
Last active August 29, 2015 14:16
MARS ROVERS PROBLEM
MARS ROVERS PROBLEM
A squad of robotic rovers are to be landed by NASA on a plateau on Mars. This plateau, which is curiously rectangular, must be navigated by the rovers so that their on-board cameras can get a complete view of the surrounding terrain to send back to Earth.
A rover's position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North.
In order to control a rover, NASA sends a simple string of letters. The possible letters are 'L', 'R' and 'M'. 'L' and 'R' makes the rover spin 90 degrees left or right respectively, without moving from its current spot. 'M' means move forward one grid point, and maintain the same heading.
Assume that the square directly North from (x, y) is (x, y+1).
sudo apt-get install unzip;
wget -O /tmp/chromedriver.zip http://chromedriver.googlecode.com/files/chromedriver_linux64_19.0.1068.0.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
moment.tz.add({zones:{"Africa/Abidjan":["-0:16:8 - LMT 1912 -0:16:8","0 - GMT"],"Africa/Accra":["-0:0:52 - LMT 1918 -0:0:52","0 Ghana %s"],"Africa/Addis_Ababa":["2:34:48 - LMT 1870 2:34:48","2:35:20 - ADMT 1936_4_5 2:35:20","3 - EAT"],"Africa/Algiers":["0:12:12 - LMT 1891_2_15_0_1 0:12:12","0:9:21 - PMT 1911_2_11 0:9:21","0 Algeria WE%sT 1940_1_25_2","1 Algeria CE%sT 1946_9_7 1","0 - WET 1956_0_29","1 - CET 1963_3_14 1","0 Algeria WE%sT 1977_9_21 1","1 Algeria CE%sT 1979_9_26 1","0 Algeria WE%sT 1981_4","1 - CET"],"Africa/Asmara":["2:35:32 - LMT 1870 2:35:32","2:35:32 - AMT 1890 2:35:32","2:35:20 - ADMT 1936_4_5 2:35:20","3 - EAT"],"Africa/Bamako":["-0:32 - LMT 1912 -0:32","0 - GMT 1934_1_26","-1 - WAT 1960_5_20 -1","0 - GMT"],"Africa/Bangui":["1:14:20 - LMT 1912 1:14:20","1 - WAT"],"Africa/Banjul":["-1:6:36 - LMT 1912 -1:6:36","-1:6:36 - BMT 1935 -1:6:36","-1 - WAT 1964 -1","0 - GMT"],"Africa/Bissau":["-1:2:20 - LMT 1911_4_26 -1:2:20","-1 - WAT 1975 -1","0 - GMT"],"Africa/Blantyre":["2:20 - LMT 1903_2 2:20",
@oleksiilevzhynskyi
oleksiilevzhynskyi / Quiz
Last active December 17, 2021 16:21
Quiz: all topics
### Quiz:
1. What is result of next line of code?
typeof null
Answer:
* `null`
* `object`
* `undefined`