Skip to content

Instantly share code, notes, and snippets.

View maghorbani's full-sized avatar
🙂

Mohammad Ali maghorbani

🙂
View GitHub Profile
from copy import deepcopy
class Wall:
def __init__(self, h, w):
self.w = w
self.h = h
self.array = [[0]*w for _ in range(h)]
self.tileValue = 1
def putTile(self, x, y, h, w, v=None):
@maghorbani
maghorbani / coc.vim
Created March 31, 2021 14:50
coc vim configuration file -> ~/.config/nvim/plug-config/coc.vim
" Set internal encoding of vim, not needed on neovim, since coc.nvim using some
" unicode characters in the file autoload/float.vim
set encoding=utf-8
" TextEdit might fail if hidden is not set.
set hidden
" Some servers have issues with backup files, see #649.
set nobackup
set nowritebackup
@maghorbani
maghorbani / coc-settings.json
Created March 31, 2021 14:47
coc settings -> ~/.config/nvim/coc-settings.json
{
"coc.preferences.formatOnSaveFiletypes": [
"css",
"markdown",
"javascript",
"javascriptreact",
"graphql",
"html",
"yaml",
"json",
@maghorbani
maghorbani / init.vim
Created March 31, 2021 14:46
the main nvim configuration file -> ~/.cinfig/nvim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
source ~/.config/nvim/plug-config/coc.vim
@maghorbani
maghorbani / coc-package.json
Created March 31, 2021 14:43
should be placed as ~/.config/coc/extensions/package.json
{
"dependencies": {
"coc-clang-format-style-options": ">=0.0.5",
"coc-clangd": ">=0.9.0",
"coc-cmake": ">=0.1.1",
"coc-css": ">=1.2.6",
"coc-json": ">=1.3.4",
"coc-php-cs-fixer": ">=0.1.2",
"coc-prettier": ">=1.1.23",
"coc-python": ">=1.2.13",
@maghorbani
maghorbani / .vimrc
Created March 31, 2021 14:32
my vimrc
" maps key sequence jk to <ESC>
inoremap jk <ESC>
" changes leader key from \ to '
let mapleader = "'"
" some editting related stuff
syntax enable
set number
set noswapfile
set hlsearch
set ignorecase