Skip to content

Instantly share code, notes, and snippets.

View wiedzmin's full-sized avatar

Alex Ermolov wiedzmin

View GitHub Profile
@wiedzmin
wiedzmin / org-yank-link.el
Created August 29, 2022 22:01 — forked from lgmoneda/org-yank-link.el
Copy Slack behavior of automatically creating link when pasting url with text selected
@wiedzmin
wiedzmin / avy-actions.el
Created May 15, 2022 18:01 — forked from karthink/avy-actions.el
Supplementary code for Avy actions for Emacs
;; Code used in the demos at https://karthinks.com/software/avy-can-do-anything
;; Tweak as desired.
(package-install 'avy)
(setq avy-keys '(?q ?e ?r ?y ?u ?o ?p
?a ?s ?d ?f ?g ?h ?j
?k ?l ?' ?x ?c ?v ?b
?n ?, ?/))
;; -*- lexical-binding: t -*-
;; timeline-mode minor mode records and shows a timeline of buffer
;; changes
;;
;; Buffer changes are stored after using complex commands and after
;; every save
;;
;; Changes are processed after 5 seconds of idleness, so that
@wiedzmin
wiedzmin / ffmpeg.md
Created March 25, 2022 17:49 — forked from liangfu/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@wiedzmin
wiedzmin / nyxt.el
Created August 16, 2021 18:16 — forked from gregoryhugaerts/nyxt.el
some emacs nyxt commands
(defun emacs-with-nyxt-sly-connect (host port)
"Connect Sly to HOST and PORT ignoring version mismatches."
(sly-connect host port)
(sleep-for 1))
(defvar emacs-with-nyxt-sly-nyxt-delay 0.3)
(defun emacs-with-nyxt-start-and-connect-to-nyxt (&optional no-maximize)
"Start Nyxt with swank capabilities. Optionally skip window maximization with NO-MAXIMIZE."
(interactive)
(async-shell-command (format "nyxt -e \"(nyxt-user::start-slynk)\""))
@wiedzmin
wiedzmin / README.md
Created May 26, 2021 08:02 — forked from bykvaadm/README.md
Postgres patron backup on Minio with prometheus monitoring

Скрипт не претендует на истину первой инстанции

Да, я знаю что есть способ ${the_best_pg_backup_method}

Это просто скрипт которым я поделился - хочешь пользуйся, не хочешь - иди мимо

@wiedzmin
wiedzmin / testandcover.sh
Created May 14, 2021 07:16 — forked from cdennison/testandcover.sh
Golang test all packages and combine cover profiles
#!/bin/bash
# https://gist.github.com/cdennison/cba009cf297aa2a92759278b5c578ae4
# This script tests multiple packages and creates a consolidated cover profile that's almost identical to coveralls/goveralls
# https://github.com/mattn/goveralls
#
# Inspired by
# https://github.com/getlantern/flashlight-build/blob/devel/testandcover.bash
function die() {
@wiedzmin
wiedzmin / funcs.el
Created February 23, 2021 07:33
timestamp yasnippet for emacs, with ✨ extra bloat ✨
(defvar il/timestamp-map '((year "%Y")
(month "%02m")
(day "%02d")
(nameofday "%A")
(time "%H:%M"))
"Mapping of the components for `il/timestamp'")
(defun il/timestamp (&optional component)
"Inserts components for timestamps.
Components are mapped in the variable `il/timestamp-map'."
@wiedzmin
wiedzmin / go-os-arch.md
Created January 20, 2021 07:35 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.14.7 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • aix
  • android
@wiedzmin
wiedzmin / npm-using-https-for-git.sh
Created December 26, 2020 09:54 — forked from taoyuan/npm-using-https-for-git.sh
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://