Skip to content

Instantly share code, notes, and snippets.

View koutsenko's full-sized avatar
🏠
Working from home

Dmitry Kutsenko koutsenko

🏠
Working from home
View GitHub Profile
@koutsenko
koutsenko / fix-git-line-endings
Created July 8, 2022 14:48 — forked from ajdruff/fix-git-line-endings
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@koutsenko
koutsenko / normalize.py
Last active May 13, 2020 21:05
font normalizer
# how to run:
# fontforge -lang=py -script ./normalize.py
import fontforge
from pathlib import Path
paths = list(Path(".").rglob("*.woff"))
# Constants
ascent = 800
/* eslint-disable no-else-return */
const fs = require('fs').promises;
const path = require('path');
/**
* Статистика слов в файле
*/
const processFile = async filePath => {
console.log('processing file', filePath);
@koutsenko
koutsenko / .conkyrc
Last active September 21, 2020 21:28
.conkyrc, секция conky.text, kds-desktop-home. Нужно править имя сетевого интерфейс и точки маунта для монитора места
conky.config = {
alignment = 'top_right',
background = false,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'white',
default_outline_color = 'black',
default_shade_color = 'black',
double_buffer = true,
draw_borders = false,