- ctrl+F4: close current file
- ctrl+alt+left: go to previous location
- ctrl+alt+right: go to next location
- shift+F6: rename
- ctrl+alt+s: setting
- ctrl+shift+F10: run current unit test
- ctrl+F8: set/unset breakpoint
- ctrl+shift+enter: complete current line and go to next
- shift+enter: go to next line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=mod( REGEXEXTRACT(text(indirect(address(row(), column())), "yyyy-mm-dd"),"\d+\-(\d+)-\d+"),2) |
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
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"
🍎 Note: all the following commands assume that the above aliases have been set
Reference: http://zerodie.github.io/blog/2012/01/19/git-rebase-i/
Convert git log from
a 49687a0a646954afdf3f4dae1f914ea793341ea2
b1
b2 <== newest
to (combine b1 and b2 to a single b commit)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' reference: http://forum.plantuml.net/3648/invisible-packages-improve-layout-diagrams-visible-packages | |
@startuml | |
skinparam shadowing false | |
'skinparam backgroundColor red | |
skinparam package { | |
fontColor blue | |
stereotypeFontColor red | |
} | |
skinparam package<<Layout>> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
containerName=$1 | |
echo "containerName: $containerName" | |
if [ "$containerName" == "" ]; then | |
echo "USAGE: $0 containerName" | |
echo " containerName: id or name" | |
exit 1 | |
fi | |
docker inspect -f \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get ip address of this machine | |
ipAddress="$(/sbin/ip -o -4 addr list eth0 2> /dev/null | awk '{print $4}' | cut -d/ -f1)" | |
if [ "$ipAddress"=="" ]; then | |
ipAddress="$(/sbin/ip -o -4 addr list enp0s3 2> /dev/null | awk '{print $4}' | cut -d/ -f1)" | |
fi | |
# List containers | |
( |
NewerOlder