Skip to content

Instantly share code, notes, and snippets.

View leonardinius's full-sized avatar

Leonids Maslovs leonardinius

View GitHub Profile
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: petstore-v2
description: The petstore API
tags:
- store-v2
- rest
spec:
type: openapi
@leonardinius
leonardinius / memory-test.ts
Created May 27, 2020 19:24 — forked from connorjclark/memory-test.ts
memory leak test
import { ChildProcess, spawn } from 'child_process';
import * as puppeteer from 'puppeteer';
const DEBUG = Boolean(process.env.DEBUG);
const CI = Boolean(process.env.CI);
const QUERY = Boolean(process.env.QUERY);
jest.setTimeout((QUERY ? 200 : 100) * 1000);
interface MemorySample {

axasas

@leonardinius
leonardinius / index.js
Created August 16, 2018 00:05
telegram-qr-bot-skeleton
const Telegraf = require('telegraf')
const Extra = require('telegraf/extra')
const QrCode = require('qrcode-reader')
const Jimp = require('jimp')
const bot = new Telegraf(process.env.BOT_TOKEN)
bot.use(Telegraf.log())
bot.catch(err => {
console.log('Ooops', err)
@leonardinius
leonardinius / 2017-06-example-sketch.png
Last active June 16, 2017 23:51
gitgraph.js sketch sample
2017-06-example-sketch.png
@leonardinius
leonardinius / bluejeans_rpm_via_alien.md
Created June 8, 2017 13:10 — forked from johnduarte/bluejeans_rpm_via_alien.md
BlueJeans rpm install on Debian

FYI, for those of us not running Debian based systems rather than RedHat, the BlueJeans RPM can be successfully installed via alien

Steps to install BlueJeans on Debian

  • Download BlueJeans RPM
  • Install alien package sudo apt-get install alien
  • Convert BlueJeans RPM to a DEB package sudo alien --to-deb bluejeans-*.rpm
  • Install resulting DEB sudo dpkg -i bluejeans_*.deb
  • Run BlueJeans with /opt/bluejeans/bluejeans-bin

You may get an error loading the expected udev library

#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
// KATA
#![feature(convert)]
use std::result::Result as StdResult;
use std::io;
use std::process::Command;
use std::path::{Path,PathBuf};
use std::error::Error;
use std::ffi::OsStr;
use std::fmt;
@leonardinius
leonardinius / log.txt
Last active August 29, 2015 14:23
snippet
DEBUG:git_wayback_machine::history: make_entry: "921ebcd|Leonids Maslovs|7 days ago|Initial commit" -> ["921ebcd", "Leonids Maslovs", "7 days ago", "Initial commit"]
DEBUG:git_wayback_machine::history: Inspect 1: Entry: "921ebcd" "7 days ago" "Leonids Maslovs": "Initial commit"
DEBUG:git_wayback_machine::history: Inspect 2: Entry: "\u{233}\u{2}\u{682}\u{7f}\u{0}" "\n\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{3cc0}" "\u{f}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{633}\u{2}\u{682
}\u{7f}\u{0}": "\u{682}\u{7f}\u{0}\u{0}\u{16}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}3\u{2}\u{682}\u{7f}\u{0}\u{0}\u{7}"
@leonardinius
leonardinius / nvim_gdb.vim
Created June 22, 2015 22:53
Rust GDB NVim frontend
sign define GdbBreakpoint text=●
sign define GdbCurrentLine text=⇒
let s:gdb_port = 7778
let s:run_gdb = "rust-gdb -q -f `find target/debug/ -type f -executable`"
let s:breakpoints = {}
let s:max_breakpoint_sign_id = 0