Skip to content

Instantly share code, notes, and snippets.

View RomiC's full-sized avatar

Roman Charugin RomiC

  • Smolyan, Bulgaria
  • 10:30 (UTC +02:00)
View GitHub Profile
@RomiC
RomiC / wti
Last active May 23, 2021 05:11
Sample of using JIRA Rest API via bash, curl and sed.
#!/bin/bash
usage() {
echo "
Usage: wti [-h?] [-l LOGIN] ISSUE...
wti = \"(W)hat (T)he (I)ssue?\". Script tries to get description of the specified
ISSUE(es) from jira. For each ISSUE in list script will ouput the line in
the following format: ISSUE_ID — ISSUE_DESC
@RomiC
RomiC / sortIssues.js
Last active August 29, 2015 13:56
Sort subtasks in JIRA by their status
(function() {
var statusPriorites = {
"На тестирование": 1,
"Включить в деплой": 2,
"Открыт": 3,
"Ожидает допостановки": 4,
"В деплое": 5,
"Закрыт": 6
};
@RomiC
RomiC / php-with-pthreading.sh
Last active August 29, 2015 14:01
configure php with pthreading support
./configure --with-libdir=/lib/i386-linux-gnu \
--disable-all \
--with-pear \
--disable-cgi \
--enable-fpm \
--with-curl \
--disable-dom \
--enable-ftp \
--with-gettext \
--with-iconv \
@RomiC
RomiC / fix.sh
Last active August 29, 2015 14:21
ubuntu locales fix
sudo locale-gen en_US en_US.UTF-8 en_US.UTF-8
sudo dpkg-reconfigure locales
@RomiC
RomiC / authorized_keys
Last active January 9, 2019 12:19
pubkeys
# macbook kate
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD5lRwNSFlFhJTWJv+xKTFXYsjK2qQFGcylCd8O2Y7BNeiNkvrdnMhhUI8ORv2WzTOV5t6t8iG51ibex0SizRAeHvuVTuIUmqGwQSETode9BlDPWp6zxwFt0mf32+8nzmT6PWFQUTI5kimRuDz9kgg3JUfogYu2kh0LX7Pkgw0cbW0hNOwqsZAqwgzmE6zUzbIQp/U1OQGLn7WvKEKqWh3IjztZb9N9m2/AO7lIJ1iM4lRXDGtIJNOLbA5BDCz5MwMZKzhZGY3CONwg7/inkZa3ESrFdAToZPwQzX7vO73bgWcRh5WJCf01T/eSgDMiqvQsgJ2Y9eoHwdaJsOwfGqWx [email protected]
# degiro workstation
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxuToTcoOjRq9NlEcDjvcyBgNr1eEfzIQRf2eJ7ytDuUStXgJCUg/sm2HZAy9P1RVviaWbHKL66VNdIey8/UWWa5NQsEbi0uMfyJLAHOSsXy70sPQosteftg0Jn6bagwPbmHuW//3pMlEMIpQ1dbPceepsbnMt/Sbvj227akF/BSYaA80Kigi5UPxmI9fVG2yJaa9tA0RRJXlh0W7UJ67T8/34yK6u69xo404uIlkKxAKsjU/bYNDVPdbVo17gntdxlqe1vpJo2K8Tpfb3jMty9VCfarmdBNXfyfQJMcy2+GgoB7OngjiGKb8jHahHWnrVNHJrxCR1mCWSxZCqvLiP [email protected]
#degiro mac
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0cFTQsaj4PPReeZoC4x5o6kvFiOGaF/uMJGfSZQtwtO3JiyOaw6GBp/V7dVMeYxkO/jakWjjddZI1FNXDC1/GBcrsbTyw8NI3vFKKwmkhyOVFoRiLcySxy
@RomiC
RomiC / socket.js
Last active October 31, 2015 10:37
js skills test
/**
* Реализовать класс для работы через некоторое API
* c помощью socket'ов. У класса должен быть один
* публичный метод, которому на вход будет поступать
* строка запроса. Метод же в ответ должен возращать
* Promise, который должен быть зарезолвлен
* (или зареджектен, в зависимости от ответа),
* как только будет получен ответ от API.
*/
export default class ApiSocket {
@RomiC
RomiC / .eslintrc
Last active April 19, 2017 11:44
Eslint settings
{
"parserOptions": {
"ecmaVersion": 6
},
"plugins": [],
"extends": [
"eslint:recommended"
],
"rules": {
"comma-spacing": ["warn"],
@RomiC
RomiC / cert.sh
Created March 11, 2017 11:55
generate certificate command
openssl genrsa -out localhost.key 2048
openssl req -new -x509 -key localhost.key -out localhost.cert -days 3650 -subj /CN=localhost
@RomiC
RomiC / extensions.json
Last active June 18, 2020 07:13
VSCode settings gist
[
{
"id": "2gua.rainbow-brackets",
"name": "rainbow-brackets",
"publisher": "2gua",
"version": "0.0.6"
},
{
"id": "alexkrechik.cucumberautocomplete",
"name": "cucumberautocomplete",
@RomiC
RomiC / human-readable-size.ts
Created November 6, 2018 14:11
Format size in human-readable way
/**
* Format size in bytes in a human-readable way
* Examples:
* - humanReadableBytes(9708) → "9.48 KB"
* - humanReadableBytes(9708098213) → "9.04 GB"
* @param bytes Amount in bytes
* @return Formatted price
*/
function humanReadableSize(bytes: number): string {
const names: string[] = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];