Skip to content

Instantly share code, notes, and snippets.

View AleksandrMihhailov's full-sized avatar
:octocat:
The only way to do great work is to love what you do

Aleksandr Mihhailov AleksandrMihhailov

:octocat:
The only way to do great work is to love what you do
View GitHub Profile
@AleksandrMihhailov
AleksandrMihhailov / colored_bash.sh
Created June 29, 2019 10:10
Colors for bash scripting
# Reset
Color_Off='\033[0m' # Text Reset
# Regular Colors
Black='\033[0;30m' # Black
Red='\033[0;31m' # Red
Green='\033[0;32m' # Green
Yellow='\033[0;33m' # Yellow
Blue='\033[0;34m' # Blue
Purple='\033[0;35m' # Purple
@AleksandrMihhailov
AleksandrMihhailov / .tmux.conf
Created January 28, 2019 00:14
Jet4Fire Tmux configuration
# | |_ _ __ ___ _ ___ __ #
# | __| '_ ` _ \| | | \ \/ / #
# | |_| | | | | | |_| |> < #
# \__|_| |_| |_|\__,_/_/\_\ #
# 1 0 | VIM | 2:bash 20:04
# [ Reset Prefix ] {{{1
set -g prefix C-a
bind-key a send-prefix # for nested tmux sessions
@AleksandrMihhailov
AleksandrMihhailov / git-fix.sh
Created January 24, 2019 13:44
bug with translation in git cli
# first option to remove translation catalogue
/usr/local/Cellar/git/{version}/share/locale/ru
# second option to reinstall git with some options
$ brew uninstall git
$ brew edit git
<<<
- depends_on "gettext"
+ depends_on "gettext" :optional
@AleksandrMihhailov
AleksandrMihhailov / vscode-extensions.sh
Created January 23, 2019 20:47
List VSCode extensions to install it from console
code --list-extensions | xargs -L 1 echo code --install-extension
@AleksandrMihhailov
AleksandrMihhailov / settings.json
Created October 20, 2018 12:32
VSCode configuration file
{
"workbench.colorTheme": "Solarized Light",
"editor.fontFamily": "Hasklig",
"editor.fontWeight": "normal",
"editor.wordWrap": "on",
"editor.renderControlCharacters": true,
"editor.cursorStyle": "line-thin",
"editor.tabSize": 4,
"editor.fontSize": 12,
"editor.fontLigatures": true,
t[a] = t.splice(o[i - 1 - a], 1, t[a]);
// is equal to...
t[a] = t[o[i - 1 - a]] = t[a];
@AleksandrMihhailov
AleksandrMihhailov / multi-telegram.sh
Created January 10, 2018 04:47
Run multiple Telegram client instances on macOS
# replace you in folder path with your macOS system account name
# create empty folder in your HOME path (replace empty_folder with your name)
/Applications/Telegram.app/Contents/MacOS/Telegram -many -workdir /Users/you/empty_folder
@AleksandrMihhailov
AleksandrMihhailov / alphaKeyGen.php
Last active February 24, 2017 09:25
Alphabet and numbers key generator
<?php
class AlphaKeyGen {
private $length;
private $alphaData, $key = [];
public function __construct($length = 5) {
$this->length = $length;
$this->alphaData = array_merge(
@AleksandrMihhailov
AleksandrMihhailov / git-log.sh
Created December 30, 2016 10:39
Beautiful git log in terminal
# git lg - to see the log
# git lg -p - to see lines, which was changed
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"