Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey volodalexey

View GitHub Profile
@volodalexey
volodalexey / README.md
Created Apr 9, 2019
Encrypt or decrypt text with NodeJS
View README.md
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
Created Apr 3, 2019
Change screen/keyboard brightness (backlight) on Ubuntu on Terminal/script
View README.md

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
Last active Jul 28, 2018 — forked from tjdecke/LICENSE.md
D3 v5 ES6 Heatmap (optimized for React or Vue)
View README.md

Heatmap Forked from https://gist.github.com/tjdecke/5558084

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 Mar 23, 2020 — forked from mbostock/.block
D3 v5 ES6 Box Plot (optimized for React or Vue)
View README.md
@volodalexey
volodalexey / README.md
Last active Jul 26, 2018 — forked from d3noob/.block
D3 v5 ES6 Bars Chart (optimized for React or Vue)
View README.md
@volodalexey
volodalexey / README.md
Last active Jul 26, 2018 — forked from msqr/LICENSE
D3 v5 ES6 Circular Gauge (optimized for React or Vue)
View README.md

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 Jul 26, 2018 — forked from mbostock/.block
D3 v5 ES6 Donut/Pie Chart (optimized for React or Vue)
View README.md

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 Sep 16, 2019 — forked from brattonc/README.md
D3 v5 ES6 Liquid Fill Gauge (optimized for React or Vue)
View README.md
You can’t perform that action at this time.