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

name: "Deploy to Server"
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
@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 / deploy-to-gh-pages.yml
Last active July 11, 2022 14:42
deploy-to-gh-pages.yml
name: Build and Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3.0.2
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.