Skip to content

Instantly share code, notes, and snippets.

View forceuser's full-sized avatar
🇺🇦
Stand with Ukraine! 💙 💛

Vitalii Dub forceuser

🇺🇦
Stand with Ukraine! 💙 💛
  • monobank
  • Dnipro, Ukraine
View GitHub Profile
function calculateBaseColor(resultColor, alpha = 0.15, backgroundColor = "#ffffff") {
// Преобразование HEX-цвета в RGB
const hexToRgb = (hex) => {
const r = parseInt(hex.slice(1, 3), 16);
const g = parseInt(hex.slice(3, 5), 16);
const b = parseInt(hex.slice(5, 7), 16);
return [r, g, b];
};
// Расчет компонента исходного цвета
@forceuser
forceuser / canvas-box-blur.markdown
Created February 1, 2020 23:51
canvas-box-blur
@forceuser
forceuser / fbootfix.md
Created June 19, 2018 14:07 — forked from smac89/fbootfix.md
Linux Fix Fastboot "no permissions, verify udev rules"

Determine your device id

  1. Unplug your device from the computer and type lsusb in the terminal. You should get an output similar to this:
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
@forceuser
forceuser / cloudSettings
Last active January 25, 2021 19:16
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-01-25T19:16:04.811Z","extensionVersion":"v3.4.3"}
@forceuser
forceuser / esm_in_node_proposal.md
Created January 29, 2018 15:35 — forked from ceejbot/esm_in_node_proposal.md
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

<html>
<head>
<script src="https://qa.polyfill.io/v2/polyfill.js?features=default,es6,es7,caniuse:console-basic&flags=gated&unknown=polyfill"></script>
<script src="https://rawgit.com/facebook/regenerator/master/packages/regenerator-runtime/runtime.js"></script>
<script>
(function _callee() {
return regeneratorRuntime.async(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
@forceuser
forceuser / remoteconsole.html
Last active April 14, 2017 15:20
Пример удаленной консоли
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://jsconsole.com/js/remote.js?8959c129-a034-4e87-9ca5-9c0d4ceb76d7"></script>
</head>
<body>
<script>

#ATOM sync settings

@forceuser
forceuser / example.js
Created February 24, 2016 16:40
Vanila JS Event Delegation
startListen(document.querySelector('.bebebe'),'click',function(e) {
console.log(e.target.innerHTML);
}, 'a');
@forceuser
forceuser / dep.js
Created February 8, 2016 12:34
test-node-inspector-issue-805
module.exports = class Example {
foo () {
console.log('hello foo!');
}
};