Skip to content

Instantly share code, notes, and snippets.

View Sc4ramouche's full-sized avatar
🐝

Vlad Kovechenkov Sc4ramouche

🐝
  • Berlin
View GitHub Profile
@Sc4ramouche
Sc4ramouche / is_numeric_function.js
Last active February 19, 2018 05:17
Function to check if the passed 'x' numeric in the context of if it is an number or an numeric string.
const isNumeric = (x) => !isNaN(parseFloat(x)) && isFinite(x);

install ESlint globally:

npm i eslint -g

in root folder of project initialize with npm npm init

initialize eslint in root folder eslint --init

add eslint to package.json

$break-sm: 480px;
$break-lg: 1024px;
@mixin respond-to($media) {
@if $media == handhelds {
@media only screen and (max-width: $break-sm) { @content; }
}
@else if $media == medium-screens {
@media only screen and (min-width: $break-sm + 1) and (max-width: $break-lg - 1) { @content; }
}
/*
npm i gulp-cli -g
npm i gulp --save-dev
npm i gulp-sass --save-dev
npm init -y
*/
const gulp = require('gulp');
const sass = require('gulp-sass');
{
"workbench.iconTheme": "vscode-icons",
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"eslint.enable": true,
"files.eol": "\n",
"editor.tabSize": 2,
"workbench.colorCustomizations": {
"editorCursor.foreground": "#d6e414"
},
"workbench.colorTheme": "Material Theme",
/*
Welcome fellow learners!
We are going to tackle JSdoc today.
1. Initialize your working directory
npm init -y
2. Install JSdoc locally
npm i --save-dev jsdoc
3. Create JavaScript file
touch test.js
@Sc4ramouche
Sc4ramouche / gist:d5296a8a3c5ec8548a81e2a20bf690eb
Created September 7, 2018 08:15
Clearing cache for metro bundler
rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-*
rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf &TMPDIR/metro-bundler-cache-*
/*
Simple iterator implementation that allows to calculate sequenced values.
Next value is calculated by the `update` function.
This construction might come in handy when it's required to generate a sequence,
but there's also no need to keep the history of previous values.
Note: could also be elegangtly descibed via class syntax with private fields.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields
*/
@Sc4ramouche
Sc4ramouche / notes.md
Last active October 22, 2023 17:34
Vim Fundamentals – notes from Frontend Masters course

Notes on Vim Fundamentals

I have been using Vim for quite some time, and switched to Neovim about a year ago. Even though I managed to make Neovim my daily driver, I didn't yet reach the familiarity with Neovim where I could say that I'm super confident using it. So my goal was to increase my confidence with Neovim by watching this course.

The following are the notes I captured during the course:

  • There's a possibility in Neovim to setup a short blinking highlight on yank. Can be useful for me, just as a quick confirmation on the yanked region.
  • When typing any command that starts with :, you can press <C-d> to get a list of possible autocompletions. Neat.
  • :Ex opens file tree in the same buffer. :Vex does the same, but with a neat vertical split.
  • Vim allows for "recursive mappings". This means you can bind some key to a command, and then in another binding use the hotkey that was introduced earlier. There was a case in the course when binding was specifically introduced as non-recursive wit