Skip to content

loktionov129/test

Repository files navigation

github training.

Remove local merged branches

  • git branch --merged develop | grep -v '^[ *]*develop$' | xargs git branch -d

Remove Cache

  • git rm -r --cached .
  • git add .
  • git commit -m "fixed untracked files"

git squash N

Which automatically squashes together the last N commits, inclusive.

git config --global alias.squash '!f(){ git reset --soft HEAD~${1} && git commit --edit -m"$(git log --format=%B --reverse HEAD..HEAD@{1})"; };f'

Create a new repository on the command line

  • echo "# Gallows" >> README.md
  • git init
  • git add README.md
  • git commit -m "first commit"
  • git remote add origin git@github.com:loktionov129/Gallows.git
  • git push -u origin master

Push an existing repository from the command line

  • git remote add origin git@github.com:loktionov129/Gallows.git
  • git push -u origin master

[README.md] Basic writing and formatting syntax

NPM version
Linux Build Status Windows Build status Coverage Status
dependencies Status devDependencies Status



# $1 - filename
# $2 - str to match

for i in $(ls -d */); do
	if [ $(cat "${i%%/}/$1" | grep -i "$2") ]; then
		echo ${i%%/}
	fi
done

#!/bin/sh
if [ $1 = "2" ]; then
    if test $(wmctrl -l | grep " - WebStorm" 2>&1 | wc -l) -eq 1; then 
        wmctrl -k on && wmctrl -a " - WebStorm"
    elif test $(wmctrl -l | grep " MonoDevelop" 2>&1 | wc -l) -eq 1; then 
        wmctrl -k on && wmctrl -a " MonoDevelop"
    fi
elif [ $1 = "3" ]; then
    if test $(wmctrl -l | grep " - PhpStorm" 2>&1 | wc -l) -eq 1; then 
        wmctrl -k on && wmctrl -a " - PhpStorm"
    elif test $(wmctrl -l | grep "alex@linux" 2>&1 | wc -l) -eq 1; then 
        wmctrl -a "alex@linux"
    fi
else
    wmctrl -k on && wmctrl -a "$1"
fi

Пингвины
![https://github.com/loktionov129/test/raw/master/Penguins.jpg](https://github.com/loktionov129/test/raw/master/Penguins.jpg?raw=true)