Skip to content

Instantly share code, notes, and snippets.

Leonids Maslovs leonardinius

Block or report user

Report or block leonardinius

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@leonardinius
leonardinius / index.js
Created Aug 16, 2018
telegram-qr-bot-skeleton
View index.js
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)
View bluejeans_rpm_via_alien.md

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

View onchange.sh
#!/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
View rust-kata.rs
// 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;
View log.txt
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 Jun 22, 2015
Rust GDB NVim frontend
View nvim_gdb.vim
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
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
View error.txt
mkdir -p .deps/build/third-party
cd .deps/build/third-party && \
cmake -G 'Unix Makefiles' \
../../../third-party
Re-run cmake no build system arguments
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
You can’t perform that action at this time.