Skip to content

Instantly share code, notes, and snippets.

View d9k's full-sized avatar
🌱

Dmitry d9k

🌱
View GitHub Profile
@d9k
d9k / # festival ru speech engine fixes
Last active May 25, 2018 00:57
/usr/share/festival/voices/russian/msu_ru_nsh_clunits/festvox/msu_ru_nsh_lexicon.scm hack
see explanation.md
<?php
# Library https://github.com/mibe/FeedWriter was used
# php 5.3 required!
require_once 'FeedWriter_Lib//Item.php';
require_once 'FeedWriter_Lib//Feed.php';
require_once 'FeedWriter_Lib//RSS2.php';
require_once 'FeedWriter_Lib//InvalidOperationException.php';
@d9k
d9k / pgadmin4.sh
Created March 15, 2018 10:39
my pgadmin4
#!/bin/bash
set -x
docker run --rm -p 5050:5050 -v /home/d9k/soft/pgadmin4/data_pgadmin:/pgadmin thajeztah/pgadmin4
return function (...)
local result = {}
local args, args_count = {...}, select('#', ...)
for i = 1, args_count do
item = args[i]
if item == nil then
table.insert(result, '')
else
table.insert(result, item)
end
@d9k
d9k / colors.less
Created July 12, 2018 18:08
atom-obsidian-syntax-mod
// These colors are specific to the theme. Do not use in a package!
@very-light-gray: #c5c8c6;
@light-gray: #969896;
@gray: #373b41;
@dark-gray: #282a2e;
@very-dark-gray: #1d1f21;
@cyan: #8abeb7;
@blue: #81a2be;
@d9k
d9k / pgadmin4.service
Last active December 15, 2018 07:51
/etc/systemd/system/pgadmin4.service
# thx https://karlstoney.com/2017/03/03/docker-containers-as-systemd-services/
[Unit]
Description=Docker pgadmin4
Requires=docker.service
After=docker.service
[Service]
#Restart=always
ExecStartPre=/bin/bash -c "/usr/bin/docker rm -f pgadmin4 || true"
#!/bin/bash
# 1) copy this file to target server (you may just use `nano` editor)
# 2) run as ` script-name username password` (starting with space symbol to prevent writing password to bash commands history)
ROOT_UID=0
SUCCESS=0
E_USEREXISTS=70
E_NOTROOT=67
# Run as root, of course. (this might not be necessary, because we have to run the script somehow with root anyway)
@d9k
d9k / back.svg
Created February 11, 2021 11:59
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# https://stackoverflow.com/questions/67341992/constructor-with-return-generic-type-based-on-param-enum-ts2322/67376400#67376400
enum Enum {
one = 'one',
two = 'two',
}
type Type1 = {
field: typeof Enum.one;
anotherField: number;