Skip to content

Instantly share code, notes, and snippets.

View Khuzha's full-sized avatar

Sardorkhuja Tukhtakhodjaev Khuzha

View GitHub Profile
{"@timestamp":"2022-03-02T20:06:49.871Z", "log.level":"ERROR", "message":"error downloading geoip database [GeoLite2-Country.mmdb]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[5cb6495eee9e][generic][T#4]","log.logger":"org.elasticsearch.ingest.geoip.GeoIpDownloader","elasticsearch.cluster.uuid":"CQ2dQk7qRrKqgCIMTysWPg","elasticsearch.node.id":"qNxXiufWQuK5i7pIeGLdfg","elasticsearch.node.name":"5cb6495eee9e","elasticsearch.cluster.name":"docker-cluster","error.type":"java.net.SocketTimeoutException","error.message":"Read timed out","error.stack_trace":"java.net.SocketTimeoutException: Read timed out\n\tat java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283)\n\tat java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309)\n\tat java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)\n\tat java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)\n\tat java.base/java.net.Socket$SocketInputStre
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Table, Column, Model, AllowNull, Length, HasOne } from 'sequelize-typescript';
void quicksort(t_sprite *arr, int first, int last)
{
t_sprite tmp;
t_qs data;
if (first < last)
{
data.middle = arr[(first + last) / 2].dist;
data.i = first - 1;
data.j = last + 1;
[zskeeter@si-i4]:~/projects/cub3d$ valgrind --leak-check=full --track-origins=yes ./cub3D maps/map.cub
==32179== Memcheck, a memory error detector
==32179== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==32179== Using Valgrind-3.17.0.GIT-lbmacos and LibVEX; rerun with -h for copyright info
==32179== Command: ./cub3D maps/map.cub
==32179==
--32179-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
==32179== Thread 2:
==32179== Invalid read of size 4
==32179== at 0x1065F0808: ??? (in /usr/lib/system/libsystem_pthread.dylib)
const bcrypt = require('bcrypt');
const src = 'hello world';
const salt = bcrypt.genSaltSync(10);
const hash1 = bcrypt.hashSync(src, salt);
const hash2 = bcrypt.hashSync(src, salt);
console.log(`src = ${src}`);
0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'i', 'compress-images' ]
1 info using npm@7.4.3
2 info using node@v15.7.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 0ms
5 timing config:load:builtin Completed in 0ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/home/khuzha/work/verifydocs/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#000">
<title>Grafana</title>
@Khuzha
Khuzha / cpp
Last active October 18, 2020 22:26
#include <iostream>
#include <string>
using namespace std;
class Exchange {
public:
string getApiUrl() {
return apiUrl;
}
void setApiUrl(string value) {
ERROR: Command errored out with exit status 1:
command: /opt/readthedocs.org/venv/bin/python /opt/readthedocs.org/venv/lib/python3.8/site-packages/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpmscda83d
cwd: /tmp/pip-install-7rmhdg6g/orjson
Complete output (44 lines):
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2020-10-13, rust version 1.49.0-nightly (8dae8cdcc 2020-10-12)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
@Khuzha
Khuzha / pgsql
Last active September 8, 2020 07:52
SELECT main.login, main.timestamp, main.partner_id, main.currency, main.ref_camp, main.subtype,
deposit, payout, main.income, dep_players_count, fd_count, bonus_amount, bonus_currency,
COUNT(reg.login) AS regs
FROM (SELECT p2.login, tr.timestamp::date, p2.partner_id, tr.currency, p1.ref_camp, tr.subtype,
SUM(tr.amount) FILTER(WHERE tr.type = 'deposit') AS deposit,
SUM(tr.amount) FILTER(WHERE tr.type = 'payout') AS payout,
SUM(tr.amount) FILTER(WHERE tr.type = 'deposit') -
SUM(tr.amount) FILTER(WHERE tr.type = 'payout') as income,
COUNT(DISTINCT tr.login) FILTER(WHERE tr.type = 'deposit') AS dep_players_count,
COUNT(tr.amount)