Skip to content

Instantly share code, notes, and snippets.

View Valexr's full-sized avatar
:octocat:
coding...

Alexander Volkov Valexr

:octocat:
coding...
View GitHub Profile

Conventional Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@Valexr
Valexr / README.md
Created March 12, 2023 04:59 — forked from manzt/README.md
esbuild-plugin-inline-webworker

esbuild-plugin-inline-webworker

Usage

// ./index.ts
import workerSrc from 'inline-worker:./worker.ts';
let worker = new Worker(workerSrc);
worker.onmessage = e => console.log(e.data); // 'world'
@Valexr
Valexr / serve.js
Created February 28, 2023 16:23 — forked from martinrue/serve.js
Using esbuild's serve function for an SPA, equivalent to webpack's `devServer.historyApiFallback`.
const http = require("http");
const esbuild = require("esbuild");
const serve = async (servedir, listen) => {
// Start esbuild's local web server. Random port will be chosen by esbuild.
const { host, port } = await esbuild.serve({ servedir }, {});
// Create a second (proxy) server that will forward requests to esbuild.
const proxy = http.createServer((req, res) => {
// forwardRequest forwards an http request through to esbuid.
@Valexr
Valexr / README.md
Created February 13, 2023 06:05 — forked from straker/README.md
Basic Tetris HTML and JavaScript Game

Basic Tetris HTML and JavaScript Game

This is a basic implementation of the game Tetris, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

@Valexr
Valexr / # stock utilities on macOS.md
Created July 21, 2022 09:15 — forked from zmwangx/# stock utilities on macOS.md
Stock utilities on macOS (stock + Command Line Tools)
  • OS version is in system_profiler_SPSoftwareDataType.txt;

  • Utilities in /bin are listed in bin.txt;

  • Utilities in /sbin are listed in sbin.txt;

  • Utilities in /usr/bin are listed in usr_bin.txt;

  • Utilities in /usr/sbin are listed in usr_sbin.txt;

  • Utilities in /usr/libexec are listed in usr_libexec.txt;

  • Default paths are

/usr/local/bin

@Valexr
Valexr / fish_shell.md
Created July 18, 2022 17:28 — forked from idleberg/fish_shell.md
Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!. Also includes several useful functions.

Installation

  1. Install fish via Brew
  2. Optionally install Oh My Fish!
  3. Add fish to known shells
  4. Set default shell to fish
brew install fish  
curl -L https://get.oh-my.fish | fish
@Valexr
Valexr / gh-pages-deploy.md
Created July 11, 2022 16:22 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@Valexr
Valexr / pages.yml
Created July 11, 2022 14:37 — forked from AndrewLester/pages.yml
Github Actions Workflow Deploy SvelteKit Github Pages
name: Build and Deploy to Pages
on:
push:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
@Valexr
Valexr / global-gitignore.md
Created May 21, 2022 06:09 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@Valexr
Valexr / nginx_nodejs.md
Created March 26, 2022 13:00 — forked from tomasevich/nginx_nodejs.md
Сервер в связке Nginx + NodeJs

Сервер в связке Nginx + NodeJs

Данная пошаговая инструкция поможет освоить основы на простом примере

Для справки

Сервер поднимался на Debian 8 c характеристиками:

CPU - 1 ядро x 500 МГц