Get Bitcoin Price Using Bybit API in Bash

Edited at 2024-04-06 15:17 UTC. With Bybit API v5 [1] it is possible to get public data (price, volume, last trading records) and also place own orders using API Key. All the next examples do not need API Key, because open public data is used here.

First, install jq for read json data and search in it to get only fields we need.

apt install jq

 

Bitcoin price in Spot trading from Bybit API. Ticker BTCUSDT info

This price is from latest finished orders.

SpeedUp Mouse Wheel on Linux

Increase wheel speed on Linux using imwheel. This will make scrolling easier, while use Chromium, Firefox, LibreOffice, viewing pdf files in Evince.

 

1. Install imwheel

apt install imwheel

 

2. Check the applications names

Check the names of applications that should be affected by imwheel settings. Run in terminal:

Configure Mouse Buttons as Copy and Paste on Linux

Extra mouse buttons on the side or also click on the wheel can be used for copy and paste or any other actions. To make extra buttons work as you need on Linux use next steps from ArchLinux wiki [1].

 

1. Install xbindkeys and xvkbd

xbindkeys allows to bind mouse buttons to any action like open terminal, open browser, copy to clipboard, paste.

xvkbd allows to send to system keyboard pressing like Ctrl + C, F5 and so on.

apt install xbindkeys xvkbd

 

Which HelloWorld Is Faster: Rust, C, C++, Bourne Shell, Python3?

Which program works faster? Does Rust compiler do things extra fast? Here are our simplest programs on Rust, C, C++, Bash, Python3. They were run 100.000 times and timings are measured.

 

Listings

Listing HelloWorld on Rust, main.rs

fn main() {
    println!("Hello, World!");
}

 

Listing HelloWorld on C, main.c

#include <stdio.h>
int main() {
    printf("Hello, World!\n");
    return 0;
}

 

Error on `git pull`: Permission denied (publickey). fatal: The remote end hung up unexpectedly

Sometimes my Devuan unexpectedly close the session, because of some JavaScripts on websites. After re-login I cannot connect to remote git repository with errors:

$ ssh remote_server
$ git pull
Error reading response length from authentication socket.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Some people advise to start ssh-agent and load keys to ssh-agent, but that does not work in my case:

Free Git Hosting In 2021

gitgud.io

Opensource hosting deployed with Gitlab.com code. Free and very convenient. Create own page on server gitgud.io.

Collaborate with colleagues or community, receive commits, give access to other users and manage permissions to projects, branches, action over them.

 

rocketgit.com

Get your space and put code to rocketgit. It has too simple web dashboard for create and overview your projects. Push your code and share with others.

 

gogs.io

Become self-hosted git owner with simple system Gogs.

 

System Monitoring Using Telegram Bot

Having systems that need a monitoring or alert about errors and fails you may use Telegram Bot. Next examples of using Telegram Bot help to watch the status of a long process, also to send lines from log, and even more, it is possible to send printscreens or also convert printscreens to text and then send it to your chat in Telegram.

This way you can monitor any process in your system with smartphone in any place.