Skip to content

Instantly share code, notes, and snippets.

View zinovyev's full-sized avatar

Zinovyev Ivan zinovyev

View GitHub Profile
@zinovyev
zinovyev / esets.sh
Last active July 1, 2022 05:47
Kill all esets processes on Mac
#! /usr/bin/env bash
ps -A | grep eset | grep -v grep
killall -m .*eset.*
@zinovyev
zinovyev / .vimrc
Last active December 24, 2015 00:59
My .vimrc config
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2014 Feb 05
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
{
"font_size": 11,
"highlight_line": true,
"ignored_packages":
[
],
"translate_tabs_to_spaces": true
}
@zinovyev
zinovyev / php_configure.sh
Last active January 3, 2016 23:49
Base config flags for php compilation.
#! /usr/bin/env bash
PHP_PREFIX=/usr/share/php
./configure --prefix=$PHP_PREFIX --enable-fpm --with-openssl --with-curl --enable-mbstring --with-mysqli --with-pdo-mysql --with-libedit --enable-soap --enable-sockets --with-pear=$PHP_PREFIX"/pear"
# Start tmux on every shell login
# 1. If not running interactively, do not do anything
# [[ $- != *i* ]] && return
# [[ -z "$TMUX" ]] && exec tmux
# 2. Only create a session if no tmux is running
# if which tmux >/dev/null 2>&1; then
# #if not inside a tmux session, and if no session is started, start a new session
# test -z "$TMUX" && (tmux attach || tmux new-session)
# fi
# Key bindings
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Set scrollback to 10000
set -g history-limit 10000
# Pane switching with Alt+arrow
bind -n M-Left select-pane -L
! To reread your .Xresources file, and throw away your old resources:
! xrdb ~/.Xresources
!
! To reread your .Xresources file, and keep your old resources:
! xrdb -merge ~/.Xresources
! XTerm config
!
! Color scheme
@zinovyev
zinovyev / bootstrap
Last active April 29, 2018 16:14
Vagrant nginx & php-fpm bootstrap.sh
#!/usr/bin/env bash
#
# Vagrant nginx & php-fpm
# Vagrant basic bootstrap.sh file configuration for getting a ready to use dev solution
#
# Ivan Zinovyev <vanyazin@gmail.com>
#
# (The "ubuntu/trusty64" box was used and tested)
#
@zinovyev
zinovyev / vagrant.info
Created March 3, 2016 20:38
Resize vagrant VM
VBoxManage clonemedium [/path/to/vagrant.vmdk] [/path/to/vagrant.vdi] --format vdi # Clone to vdi cause VBox can not resize vmdk format
VBoxManage modifyhd [/path/to/vagrant.vdi] --resize 30000 # Resize to 30Gb
VBoxManage modifyvm [wbox-name] --hda [/path/to/vagrant.vdi] # Attach to VM
@zinovyev
zinovyev / git-daemon.service
Created May 15, 2016 13:20
/etc/systemd/system/git-daemon.service to start and enable git-daemon via systemd
[Unit]
Description=Git Repositories Server Daemon
Documentation=man:git-daemon(1)
[Service]
# Ignore non-zero exit status, access error makes git-daemon return them
ExecStart=/usr/bin/git daemon \
--user=git --group=git \
--reuseaddr \
--base-path=/opt/git/ \