Skip to content

Instantly share code, notes, and snippets.

View OleksiyRudenko's full-sized avatar
💻
Delivering

Oleksiy Rudenko OleksiyRudenko

💻
Delivering
View GitHub Profile
@OleksiyRudenko
OleksiyRudenko / github-UI-tips-n-tricks.md
Last active December 11, 2021 13:29
GitHub tips and tricks

Fuzzy file finder

On any repo press t to start fuzzy file finder

Code snippet:

  • Open a file
  • Select a code line
  • SHIFT+LeftClick to select multiple
  • RightClick for context menu + Copy permalink or press y It renders nicely when in an issue comment
@OleksiyRudenko
OleksiyRudenko / count-entries-in-an-array.md
Last active November 3, 2020 11:13
Counting entries in an array

Classics:

Count number of each entry in an array. I.e. someFunc(['a', 'b', 5, 'a', 2, 5]) should result in

{
  2: 1,
  5: 2,
  'a': 2,
  'b': 1
@OleksiyRudenko
OleksiyRudenko / instructions.rst
Created January 5, 2020 13:31 — forked from Nachtalb/telegram-desktop-multiple-accounts.rst
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]

How to add multiple accounts to Telegram Desktop

Table of Contents

Introduction

ATM of writing this, there is no way inside the Telegram Client to switch accounts (event though this feature exists in the offical mobile clients and there is a long running issue here: telegramdesktop/tdesktop#4261).

@OleksiyRudenko
OleksiyRudenko / why-newline.md
Last active April 23, 2024 08:07
Why should text files end with a newline?

Why should text files end with a newline?

Reasons:

  • UNIX standard
  • If the last line in a file doesn't end with a newline then addition of next line affects two lines instead of one. This also pollutes diff on multiple files, so reader may wonder what has changed in a line whereas no significant change has occured.

Multiple newlines at the file end are also redundant as well as spaces at the end of line.

WORK IN PROGRESS

Unintended submodule issue

One of the problems developers new to git may face is a mysterious sub-modules they didn't expect to have.

These are seen as a Submodule <pull request title> at <commit-hash> under Files changed tab in a pull request.

// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var domStyle = document.createElement("style");
domStyle.append(
'* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\
* * { background-color: rgba(0,255,0,.2) !important; }\
* * * { background-color: rgba(0,0,255,.2) !important; }\
* * * * { background-color: rgba(255,0,255,.2) !important; }\
* * * * * { background-color: rgba(0,255,255,.2) !important; }\

[MIT Licensed][license] [![Kottans-Frontend][icon-kottans-fe]][kottans-frontend] [![Kottans-Backend][icon-kottans-be]][kottans-backend] [![Kottans-CS][icon-kottans-cs]][kottans-cs]

....

At the file end (open source to view)

@OleksiyRudenko
OleksiyRudenko / HW-Weather-App-preps.md
Last active February 26, 2019 21:19
Getting prepared for component powered Weather App

Component Powered Weather App - Getting Prepared

After intro to MVC and other design patterns (video, slides) we need to get prepared for the next iteration.

What needs to be done

By next workshop every student is expected to:

@OleksiyRudenko
OleksiyRudenko / MVC.md
Last active February 19, 2019 08:13
MVC

MVC

MVC stands for Model-View-Controller

MVC is a design pattern implementing the Separation of Concerns principle on a global application level.

The actual purpose of MVC is to separate your views from your controller and model. In other words,

Home task

In Memory Pair Game Project:

  1. Create package.json
  2. Install eslint, prettier and pluginf for code editor/IDE
  3. Read explanations to all errors forund by eslint according to eslint-config-airbnb

Installation step-by-step

  1. Create package in a directory: Option 1: