Skip to content

Instantly share code, notes, and snippets.

View anton-rudeshko's full-sized avatar
❄️
Snowflake

Anton Rudeshko anton-rudeshko

❄️
Snowflake
View GitHub Profile
### Keybase proof
I hereby claim:
* I am anton-rudeshko on github.
* I am anton_rudeshko (https://keybase.io/anton_rudeshko) on keybase.
* I have a public key whose fingerprint is 660A EEB6 C343 5ACE F0E0 B482 DE6F D9A3 8000 065A
To claim this, I am signing this object:
#!/usr/bin/env bash
source tc-props.bash
echo "Running on $agent_name"
echo "Deploying $org_app_version to $org_deploy_server..."
# ...
@anton-rudeshko
anton-rudeshko / life-on-the-command-line.md
Created April 4, 2019 10:20
Copy paste of "Life on the Command Line"

Stephen Ramsay - Sat, 04/09/2011 - 19:49

A few weeks ago, I realized that I no longer use graphical applications.

That’s right. I don’t do anything with GUI apps anymore, except surf the Web. And what’s interesting about that, is that I rarely use cloudy, AJAXy replacements for desktop applications. Just about everything I do, I do exclusively on the command line. And I do what everyone else does: manage email, write things, listen to music, manage my todo list, keep track of my schedule, and chat with people. I also do a few things that most people don’t do: including write software, analyze data, and keep track of students and their grades. But whatever the case, I do all of it on the lowly command line. I literally go for months without opening a single graphical desktop application. In fact, I don’t — strictly speaking — have a desktop on my computer.

I think this is a wonderful way to wor

@anton-rudeshko
anton-rudeshko / git-lfs-to-json.awk
Last active August 30, 2021 20:45
Convert `git lfs --debug` output to json.
# Usage: git lfs ls-files -d | awk -f git-lfs-to-json.awk > lfs-files.json
BEGIN {
RS = ""
FS = "\n"
print "["
}
{
split($1, filepath, ": ")
@anton-rudeshko
anton-rudeshko / convert.sh
Last active October 17, 2020 01:01
Convert GoPro photos to timelapse video using ffmpeg CLI.
#!/usr/bin/env bash
# -r 60: 60 FPS
# -y: rewrite output file
# -start_number 11555: first frame number
# -i 'G%07d.JPG': file format
# -vf "crop=h=2250": video filter to crop input frame height from 3000 to 2250 (which will be eventually downscaled to 720)
# -c:v libx264: video codec x264
# -crf 20: x264 encoding quality (less = better)
# -s 1280x720: output size
@anton-rudeshko
anton-rudeshko / gpg-on-removable.md
Last active July 13, 2020 15:08
GPG on the flash drive (Windows FAT 32)

GPG on removable media

$ gpg --version
gpg (GnuPG/MacGPG2) 2.2.8
libgcrypt 1.8.3
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@anton-rudeshko
anton-rudeshko / gpg.conf
Last active September 5, 2018 22:23
Let's talk GnuPG Materials
# Based on:
# - https://www.gnupg.org/faq/gnupg-faq.html
# - https://raw.githubusercontent.com/ioerror/duraconf/master/configs/gnupg/gpg.conf
# If you have more than 1 secret key in your keyring, you may want to
# uncomment the following option and set your preferred keyid.
# default-key KEYID
# If you do not pass a recipient to gpg, it will ask for one. Using
# В отчётах в CSV разделителем идёт точка с запятой, а не запятая
BEGIN {
FS=";"
}
# В первой строке ищем колонку с нужным именем и сохраняем её индекс
NR == 1 {
for (i = 1; i <= NF; i++)
if ($i == target)
column_idx = i
@anton-rudeshko
anton-rudeshko / stars.js
Last active December 21, 2015 10:39
Простой преобразователь цифрового рейтинга в дробно-звёздочный.
function modelRating(rating, maxStars) {
return Array.apply(0, new Array(maxStars || 5)).map(function(ignore, index) {
var step = rating - index;
return step >= 1 ? 'full' : step >= 0.5 ? 'half' : 'empty';
});
}
modelRating(3) // ["full", "full", "full", "empty", "empty"]
modelRating(4.5) // ["full", "full", "full", "full", "half"]
modelRating(0) // ["empty", "empty", "empty", "empty", "empty"]
@anton-rudeshko
anton-rudeshko / insertSeparatorSnippet.js
Created August 2, 2013 10:37
Аналог Array#join() для любых типов
function insertSeparator(array, separator) {
var index = array.length - 1;
while (index) array.splice(index--, 0, separator);
return array;
}