Skip to content

Instantly share code, notes, and snippets.

View michaelradionov's full-sized avatar

Michael Radionov michaelradionov

View GitHub Profile
@michaelradionov
michaelradionov / WZ_ribbon
Created February 14, 2018 08:50
Полоска про Web Завтрак
<style>
.flagsoft_line {
font-family: "Trebuchet MS";
width: 100%;
position: fixed;
bottom: 0;
left: 0;
display: none;
background: rgb(61,31,176);
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJod…IgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
@michaelradionov
michaelradionov / fixup_committer_date.sh
Last active February 24, 2018 15:51 — forked from bfoz/fixup_committer_date.sh
Force GIT_COMMITTER_DATE = GIT_AUTHOR_DATE
git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'
rm -fr "$(git rev-parse --git-dir)/refs/original/"
@michaelradionov
michaelradionov / genpass.sh
Created July 8, 2018 14:54
Generate passwords in Unix/Bash (put this in your ~/.bashrc file)
alias passgen='openssl rand -base64 6' # generate 6 symbols random password
alias genpass='passgen' # yeah, i'm stupid
@michaelradionov
michaelradionov / Install-micro.sh
Last active August 31, 2018 11:50
Install Micro editor, then run it like "m file.txt"
cd ;\
curl https://getmic.ro | bash; \
echo 'alias m="~/micro"' >> .bashrc; \
source ~/.bashrc;
publish () {
issues=`git log --pretty=format:"%C(yellow)%h %Cred%ad %Cblue%an%C(auto)%d %Creset%s" --date=short --graph $1 | perl -ne '{ /([A-Z]{1,5})-(\d+)/ && print "$1-$2, " }' | sort | uniq |sed 's/.\{2\}$//'`;
open "https://jira.flagstudio.ru/issues/?jql=issuekey in ($issues) ";
}
alias jo='function _jo(){ open https://jira.flagstudio.ru/browse/$1; };_jo'
alias ji='function _ji(){ curl -s -u user:password https://jira.flagstudio.ru/browse/$1 | grep "<title>" | sed -E "s/(<title>|<\/title>)//g" ; };_ji'
function gl2() {
git log --pretty=format:"%C(yellow)%h %Cred%ad %C(white)%an%C(auto)%d %Creset%s" --color --date=short --graph $1 | \
while read -r i
export EDITOR='micro'
export CHEAT_EDITOR='micro'
export PATH="$HOME/.composer/vendor/bin:$PATH"
export PATH="vendor/bin:$PATH"
export PATH="/usr/local/bin:$PATH"
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
export HISTTIMEFORMAT="%d/%m/%y %T "
# Other aliases
alias la='ls -alh'
alias hosts='cat ~/.ssh/config' # я храню хосты в этом файле. это позволяет подключаться к ним вот так ssh 47
alias passgen='openssl rand -base64 6' #сгенерировать пароль
alias genpass='passgen' # я тупой
alias b='m ~/.bashrc'
alias m='micro'
alias atom='atom -a'
alias code='code -a'
alias p='pstorm'
@michaelradionov
michaelradionov / Makefile
Created October 28, 2018 16:44
Makefile
#!/usr/bin/make
# Makefile readme (ru): <http://linux.yaroslavl.ru/docs/prog/gnu_make_3-79_russian_manual.html>
# Makefile readme (en): <https://www.gnu.org/software/make/manual/html_node/index.html#SEC_Contents>
SHELL = /bin/sh
REGISTRY_HOST = registry.gitlab.com
REGISTRY_PATH = tarampampam/laravel-in-docker/
IMAGES_PREFIX := $(shell basename $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
@michaelradionov
michaelradionov / Laravel 5.7 SVG
Created November 4, 2018 04:29
Little bash script to download fancy Laravel SVG's to your project when updating to 5.7
mkdir -p public/svg; \
cd public/svg; \
curl -O https://raw.githubusercontent.com/laravel-shift/laravel-5.7/master/public/svg/403.svg; \
curl -O https://raw.githubusercontent.com/laravel-shift/laravel-5.7/master/public/svg/404.svg; \
curl -O https://raw.githubusercontent.com/laravel-shift/laravel-5.7/master/public/svg/500.svg; \
curl -O https://raw.githubusercontent.com/laravel-shift/laravel-5.7/master/public/svg/503.svg; \
cd ../..;
curl https://gist.githubusercontent.com/michaelradionov/84879dc686e7f9e43bc38ecbbd879af4/raw/17f942d078b5b2202dd12eab9a5c4d55b4a06259/Docker_Ubuntu_16.sh | sudo bash
curl -L https://iterm2.com/shell_integration/install_shell_integration.sh | bash
eval "$(curl "https://raw.githubusercontent.com/michaelradionov/gg_installer/master/gg_installer.sh")" && gg_installer bdsm
bdsm --install-all