Skip to content

Instantly share code, notes, and snippets.

View yoursdearboy's full-sized avatar
:shipit:
Ship it!

Kirill Voronin yoursdearboy

:shipit:
Ship it!
View GitHub Profile
@yoursdearboy
yoursdearboy / README.md
Created December 22, 2023 14:22
Video with speech to text

File conversion

Here we use ffmpeg command, which can be installed on Ubuntu / Debian using apt-get install ffmpeg.

Next commands can be combined into one, though I prefer to keep each part separate.

  1. Convert video (mp4 with aac audio) to audio.
ffmpeg -i video.mp4 -vn -acodec copy video.aac

Annotation: log10 tick marks on logit scale

This annotation adds log tick marks with diminishing spacing on logit scale.

Useful for small and mid values, though not for high. Anyway, better than nothing.

source("https://gist.githubusercontent.com/yoursdearboy/8ebb35e31b88d0477ceab2ce3112ecb7/raw/1b886c371a6d15235758a5f4fc78ed953e2bb022/annotation-logitticks.R")

df <- data.frame(x = 1 / (1 + exp(-rlogis(100, -2))),
https://disk.yandex.ru/d/ClMQyGaKI9sLCQ
#/bin/sh
if [ "$#" -lt 1 ]; then
echo "Usage: clipserver.sh 127.0.0.1 [1234]"
exit
fi
ADDR=$1
if [ "$#" -eq 2 ]; then PORT=$2; else PORT=$RANDOM; fi
@yoursdearboy
yoursdearboy / export.js
Created June 26, 2020 11:13
Automate Firefox Lockwise export
/* Firefox Lockwise password copy buttons.
1. Copy code below to the console.
2. Select each login in the left menu, click Copy password button.
3. Click Copy all passwords button.
4. ???
5. PROFIT
*/
const TIMEOUT = 300;
var passwords = [];
@yoursdearboy
yoursdearboy / ediff
Created October 22, 2019 11:30
Emacs Ediff using emacsclient with exit code on exit
#!/bin/sh
# Author: Kirill Voronin <[email protected]>
# Ediff with exit code
# Opens ediff in existing Emacs window using emacsclient
# and returns exit code when *ediff-diff* buffer closed
get_buffer() {
emacsclient --eval "(get-buffer \"$1\")"
}
@yoursdearboy
yoursdearboy / .gitconfig
Created August 13, 2019 11:01
Compare XLSX files using [daff](http://paulfitz.github.io/daff/)
[diff "xlsx"]
command = xlsx2daff diff
[diff "csv"]
command = daff diff --git
@yoursdearboy
yoursdearboy / Multitran.alfredworkflow
Last active December 30, 2022 08:53
Alfred workflow to lookup multitran.ru
@yoursdearboy
yoursdearboy / Dockerfile
Last active April 17, 2018 08:55
Socks proxy за 5 минут - регистрируем сервер и запускаем setup.sh на машине с Ubuntu https://m.do.co/c/2677ff7955bf ($10 в подарок)
FROM wernight/dante
RUN sed -i '177s/#socksmethod/socksmethod/' /etc/sockd.conf
EXPOSE 1080
ENTRYPOINT ["dumb-init"]
CMD ["sockd"]
@yoursdearboy
yoursdearboy / rails-console-remote.el
Created February 15, 2017 12:50
Remote Rails console over SSH
;;; rails-console-remote.el --- remote rails console over ssh
;; Copyright (C) 2016 Kirill Voronin <[email protected]>
;; Author: Kirill Voronin <[email protected]>
;; Keywords: rails
;; Version: 0.0.1
(defun rails-console-remote (&optional host &optional path &optional env &optional user-cmd)
"Call `run-ruby'."