Skip to content

Instantly share code, notes, and snippets.

Dmitry Myadzelets DmitryMyadzelets

Block or report user

Report or block DmitryMyadzelets

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
DmitryMyadzelets /
Created Sep 12, 2019
How to get back wlan0 name in Debian
DmitryMyadzelets /
Last active May 14, 2019
Record audio stream in Linux

Record the current audio stream, and convert to mp3.

parec -d 0 | lame -r -V0 - out.mp3

Split the file based on silence in it. Source.

sox -V3 in.mp3 out_.mp3 silence -l 1 0.5 0.1% 1 2.0 0.1% : newfile : restart
View index.html
<link href='' rel='stylesheet' type='text/css'>
<a id="view-code" href="" target="_blank">VIEW CODE</a>
<div id="window">
<div id="header">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
DmitryMyadzelets /
Last active Jan 10, 2019
Keybord layouts collection

Layouts for 40% keyboards

View index.js
const factorial = (n) => n ? n * factorial(n - 1) : 1
// Given n, choose k - [Combination](
const C = (n, k) => factorial(n) / (factorial(k) * factorial(n-k))
curl -s | python -

Example output:

Retrieving configuration...
Testing from WIND (
Retrieving server list...
Selecting best server based on ping...
DmitryMyadzelets / raspi-monitor
Created Jun 28, 2017 — forked from simlun/raspi-monitor
Script to enable and disable the HDMI signal of the Raspberry PI
View raspi-monitor
#!/bin/bash -e
# /usr/local/sbin/raspi-monitor
# Script to enable and disable the HDMI signal of the Raspberry PI
# Inspiration:
function on {
/opt/vc/bin/tvservice --preferred
DmitryMyadzelets / ready.js
Created May 30, 2017
When a web page is ready for manipulation. Altrernative for jQuery ready()
View ready.js
// Invokes callback when DOM is ready for manipulation
// Usage: ready(function () {});
function ready(callback) {
// Motivation:
// Docs:
var loading, done;
View it.zodiac.json
You can’t perform that action at this time.