Skip to content

Instantly share code, notes, and snippets.

View ur4ltz's full-sized avatar

Andy Shevchenko ur4ltz

  • Kharkiv - Ukraine, Glory to Ukraine
View GitHub Profile
@ur4ltz
ur4ltz / crontab
Created December 1, 2019 15:08 — forked from mdeangelo001/crontab
Reboot dd-wrt router via web interface and curl
# My DD-WRT router would not reboot reliably except by going through the web interface.
# The reboot settings in the UI did not work consistently, and ssh access did not work
# reliably either. I was able to figure out the following curl command that makes the
# basically presses the Reboot Router button on the Administration->Management screen.
# This crontab reboots the router every night at 3:30 am
30 3 * * * /usr/bin/curl --referer http://192.168.1.1/Management.asp -d submit_button=Management -d action=Reboot -u admin:password --http1.1 -v http://192.168.1.1/apply.cgi
@ur4ltz
ur4ltz / init.vim
Created January 10, 2020 01:33 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
{
"suggest.noselect": false,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"typescript",
"typescriptreact",
"json",
"javascriptreact",
"typescript.tsx",
"graphql"
@ur4ltz
ur4ltz / help.vim
Created January 18, 2020 17:51 — forked from wbthomason/help.vim
Neovim: Open help in a floating window
scriptencoding utf-8
" This function originates from https://www.reddit.com/r/neovim/comments/eq1xpt/how_open_help_in_floating_windows/; it isn't mine
function! CreateCenteredFloatingWindow() abort
let width = min([&columns - 4, max([80, &columns - 20])])
let height = min([&lines - 4, max([20, &lines - 10])])
let top = ((&lines - height) / 2) - 1
let left = (&columns - width) / 2
let opts = {'relative': 'editor', 'row': top, 'col': left, 'width': width, 'height': height, 'style': 'minimal'}
@ur4ltz
ur4ltz / sublime-settings-osx.json
Created February 1, 2020 07:15 — forked from arvi/sublime-settings-osx.json
Sublime Settings OSX
{
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
"characters": ".",
"selector": "source.js"
@ur4ltz
ur4ltz / theme.vim
Created February 24, 2020 00:35 — forked from GoldsteinE/theme.vim
hi VertSplit ctermbg=NONE guibg=NONE guifg=#455354
hi CursorLine term=NONE cterm=NONE gui=NONE
hi SpellCap guibg=#383900 cterm=NONE gui=NONE
hi SpellBad guibg=#661400 cterm=NONE gui=NONE
hi Pmenu guibg=#2d3135 guifg=#a0d1d9
hi PmenuSel guibg=#818890
hi PmenuSbar guibg=#121315
hi PmenuThumb guibg=#b1bfcc guifg=#66d9ef
hi NeomakeWarningSign guifg=#969900 guibg=#232526 cterm=NONE gui=NONE
hi NeomakeErrorSign guifg=#991f00 guibg=#232526 cterm=NONE gui=NONE
@ur4ltz
ur4ltz / colors.vim
Created February 24, 2020 00:38 — forked from GoldsteinE/colors.vim
for r/unixporn
" It's not a real config, but the hi commands from my actual ~/.vimrc
" Base color scheme: https://github.com/gosukiwi/vim-atom-dark
colorscheme atom-dark
hi VertSplit ctermbg=NONE guibg=NONE guifg=#455354
hi CursorLine term=NONE cterm=NONE
hi SpellCap guibg=#383900
hi SpellBad guibg=#661400
hi Pmenu guibg=#2d3135 guifg=#a0d1d9
hi PmenuSel guibg=#818890
hi PmenuSbar guibg=#121315
@ur4ltz
ur4ltz / .vimrc
Created February 24, 2020 00:39 — forked from GoldsteinE/.vimrc
let perl_sub_signatures = 1
set modeline
set incsearch
set encoding=utf-8
set splitbelow
set backspace=indent,eol,start
set updatetime=100
set wildmenu
filetype plugin indent on
let mapleader = ' '
@ur4ltz
ur4ltz / VimScriptForPythonDevelopers.MD
Created June 1, 2020 13:46 — forked from yegappan/VimScriptForPythonDevelopers.MD
Vim script for Python Developers

Vim Script for Python Developers

A guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with programming in Python.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a similar guide for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, key-mapping, [abbrevi