Skip to content

Instantly share code, notes, and snippets.

@volodalexey
volodalexey / README.md
Last active October 24, 2022 21:16 — forked from brattonc/README.md
D3 v5 ES6 Liquid Fill Gauge (optimized for React or Vue)
@volodalexey
volodalexey / README.md
Last active July 26, 2018 07:10 — forked from mbostock/.block
D3 v5 ES6 Donut/Pie Chart (optimized for React or Vue)

Donut/Pie Chart Forked from https://gist.github.com/mbostock/3887193

optimized for React or Vue

It means you can invoke renderChart() as many times as you wish.

E.g. in React:

import React, { Component } from 'react'
import { renderChart, destroyChart } from '...'
@volodalexey
volodalexey / README.md
Last active January 13, 2023 09:41 — forked from msqr/LICENSE
D3 v5 ES6 Circular Gauge (optimized for React or Vue)

Circular Gauge Forked from https://gist.github.com/msqr/3202712

optimized for React or Vue

It means you can invoke renderChart() as many times as you wish.

E.g. in React:

import React, { Component } from 'react'
import { renderChart, destroyChart } from '...'
@volodalexey
volodalexey / README.md
Last active July 26, 2018 14:13 — forked from d3noob/.block
D3 v5 ES6 Bars Chart (optimized for React or Vue)
@volodalexey
volodalexey / README.md
Last active February 21, 2021 00:00 — forked from mbostock/.block
D3 v5 ES6 Box Plot (optimized for React or Vue)
@volodalexey
volodalexey / README.md
Last active November 17, 2023 16:22 — forked from tommaybe/LICENSE.md
D3 v5 ES6 Heatmap (optimized for React or Vue)
@volodalexey
volodalexey / README.md
Created April 3, 2019 11:32
Change screen/keyboard brightness (backlight) on Ubuntu on Terminal/script

To see your Laptop model you can do following:

sudo dmidecode | grep Version

If you have ASUS Laptop as me N501JW.210 than you have two brightness/backlight controls one for display/screen and second one for keyboard.

You can change brightness from command-line with following command:

echo 400 | sudo tee /sys/class/backlight/intel_backlight/brightness
@volodalexey
volodalexey / README.md
Created April 9, 2019 11:46
Encrypt or decrypt text with NodeJS
const crypto = require('crypto');

const ALGORITM = 'aes-256-cbc';
const RAW_ENCODING = 'utf8';
const ENCRYPTED_ENCODING = 'hex';

function encryptAsync(password, data) {
  return new Promise((resolve, reject) => {
    try {
@volodalexey
volodalexey / README.md
Last active February 20, 2022 14:03
Install/Play Serious Sam 4 GOG on Linux [Ubuntu] [Proton GE] [PlayOnLinux]

Recently I cam acroos interesting article Serious Sam 4 Linux DXVK Wine

I found out that this article is outdated + additionally I wanted to setup Serious Sam on PlayOnLinux (not Lutris).

Here is my steps.

1 (Optional) Change default PlayOnLinux location

First of all Serious Sam 4 requires 42 GB of storage. This is too much for my system folder. However I have additional mounted disk/folder. The problem is that PlayOnLinux by default store its "bottles" in the home path (different virtual wine folders), e.g. ~/.PlayOnLinux.

@volodalexey
volodalexey / README.md
Last active February 25, 2023 10:48
Telegram Bot API - sendPhoto example with NodeJS

Example of sendPhoto method with pure NodeJS without third-party modules.

const fs = require('fs');
const https = require('https');

const chat_id = '...123...'; // telegram chat id
const botToken = '...aaa...'; // telegram bot token

const imageBuffer = fs.readFileSync('./image.jpg');