Skip to content

Instantly share code, notes, and snippets.

View kostya-x's full-sized avatar

Kostya kostya-x

  • Odessa, Ukraine
View GitHub Profile
@kostya-x
kostya-x / conventional_commit_messages.md
Created February 20, 2024 03:39 — forked from qoomon/conventional-commits-cheatsheet.md
Conventional Commit Messages

Conventional Commit Messages

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

ℹ️ git-conventional-commits A CLI util to ensure this conventions and generate changelogs

Commit Message Formats

Default

1. Получаем хэш-код коммита, к которому хотим вернуться.
2. Заходим в папку репозитория и пишем в консоль:
$ git reset --hard a3775a5485af0af20375cedf46112db5f813322a
$ git push --force
@kostya-x
kostya-x / hint.js
Created June 7, 2020 16:39
Show hints for devices based on is it touchscreen or not
const hint = document.querySelector(".hint");
if ("ontouchstart" in document.documentElement) {
hint.innerHTML = "Hint for touch devices";
} else {
hint.innerHTML = "Hint for keyboard";
}
@kostya-x
kostya-x / static_server.js
Last active December 14, 2019 04:01 — forked from aolde/static_server.js
Simple web server in Node.js. This fork added mime types for common file types.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888,
mimeTypes = {
"html": "text/html",
"jpeg": "image/jpeg",
"jpg": "image/jpeg",
"png": "image/png",