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 / 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.

@OleksiyRudenko
OleksiyRudenko / Build-and-Publish.md
Last active March 28, 2024 02:04
Building and publishing a web app @ github pages using ParcelJS

BAAS

BAAS cloud hosting NodeJS lambdas Auth RDBMS NoSQL CLI
[Supabase][_sb]
[Conduit][_cd]
[Acebase][_ab]
[Vercel][_vc]
[x][_]
@OleksiyRudenko
OleksiyRudenko / collapsable.md
Last active November 6, 2022 10:28 — forked from joyrexus/README.md
Collapsable markdown

collapsable markdown?

See this gist source code for details (pun intended :) )

Content wrapped in <p> tag

<details><summary>CLICK ME</summary>
<p>
@OleksiyRudenko
OleksiyRudenko / Promise-chaining.md
Created October 22, 2022 21:00
Promises chaining
    anArray
        .filter(x => x % 2) // odd only
        .reduce(
            (chain, x) => chain.then(() => networkCall(x)), // network call using an odd
            Promise.resolve()
        )
        .then(() => console.log('all done')) // all calls complete
@OleksiyRudenko
OleksiyRudenko / Re-sync fork with upstream.md
Last active September 19, 2022 21:15
Fixing contribution issues

Re-sync fork with upstream

Often beginner contributors face on their contribution path an issue when a PR contains commits the contributor didn't intend to include in the PR.

Table of Contents

// based on parts of: http://exploringjs.com/es6/ch_classes.html
const methodName = 'myMethod'; // for computed method names
// class
class Point {
// publicProperty = defaultValue; // NB! Unsupported yet? No assignment - no property!
publicProperty = 1; // need no constructor if it is only to initialize class properties
constructor(x, y) {
this.x = x;
@OleksiyRudenko
OleksiyRudenko / PAT for workflows.md
Last active July 27, 2022 16:14
Re-issue IDE OAuth token that allows to push GitHub workflows

IDE

(See recipe for Windows below)

I've literally just come across this problem when trying to use IntelliJ to push to a branch that contains a GitHub Action workflow (YAML file in .github/workflows). I didn't find existing resources on the Internet very helpful, so I hope this will help you fix it too.

TL;DR: Generate a new Personal Access Token with the workflow scope enabled in GitHub and configure your application to use that.