Skip to content

Instantly share code, notes, and snippets.

View exdeniz's full-sized avatar

Igor Pnev exdeniz

  • VerstkaLab
  • Amster, NL
View GitHub Profile
@exdeniz
exdeniz / rename.py
Created August 28, 2021 21:50
Recursively rename files to their parent folder’s name
import os
'''
from http://www.salemmarafi.com/code/recursively-rename-files-to-their-parent-folders-name/
Function: renameFiles
Parameters:
@path: The path to the folder you want to traverse
@depth: How deep you want to traverse the folder. Defaults to 99 levels.
'''
@exdeniz
exdeniz / translit.sh
Created May 13, 2021 08:31
Перекодирует рекурсивно в текущем каталоге имена файлов и каталогов в транслит.
#!/bin/bash
# Перекодирует рекурсивно в текущем каталоге имена
# файлов и каталогов в транслит.
shopt -s nullglob
for NAME in * ; do
filename=$(basename "$NAME");
extension=${filename##*.};
filename=${filename%.*};
@exdeniz
exdeniz / migrate_from_exist_hitory.sh
Created June 6, 2020 21:17
Remove Duplicate zsh History
cat -n .zsh_history | sort -t ';' -uk2 | sort -nk1 | cut -f2- > .zhistory
@exdeniz
exdeniz / autofill-reset.css
Created May 24, 2020 00:56
Full reset autofill
input:-webkit-autofill,
input:-webkit-autofill::first-line,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
@exdeniz
exdeniz / clip.vim
Created May 22, 2020 02:41
VIM and wayland with wl-clipboard fixed problem with pasting content from GTK3 with ^M at the end of lines
if !empty($WAYLAND_DISPLAY)
let g:clipboard = {
\ 'name': 'wayland-strip-carriage',
\ 'copy': {
\ '+': 'wl-copy --foreground --type text/plain',
\ '*': 'wl-copy --foreground --type text/plain --primary',
\ },
\ 'paste': {
\ '+': {-> systemlist('wl-paste --no-newline | tr -d "\r"')},
\ '*': {-> systemlist('wl-paste --no-newline --primary | tr -d "\r"')},
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Navigate key
nnoremap <F2> :NERDTreeToggle<cr>
nnoremap <C-S-L> :tabn<CR>
nnoremap <C-S-H> :tabp<CR>
@exdeniz
exdeniz / style.css
Created January 11, 2020 00:09
Nord Theme for
* {
background-image: none;
}
window {
background-color: rgba(46, 52, 64, 0.9);
}
button {
background-color: #2e3440;
border-style: solid;
border-width: 0px;
@exdeniz
exdeniz / post1.md
Last active December 20, 2019 16:06

О "кирпичной квартире" от Goodwood и другие посты телеграмма

@exdeniz
exdeniz / regexCheatsheet.js
Created July 16, 2019 20:23 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@exdeniz
exdeniz / replace.regexp
Created August 18, 2018 06:50
VS Code regex find and replace text between brackets
className="(.+?)"
className={css.$1}