Skip to content

Instantly share code, notes, and snippets.

@askalee
askalee / git_squish.md
Last active June 21, 2018 09:26
git: squash
@askalee
askalee / readme.md
Last active June 22, 2018 01:50 — forked from benstr/readme.md
Gist Markdown Cheatsheet

Heading 1 by # Heading 1

Heading 2 by ## Heading 2

Heading 3 by ### Heading 3

Heading 4 by #### Heading 4

Heading 5 by ##### Heading 5
Heading 6 by ######Heading 6

Paragraph

@askalee
askalee / git_command_line_essentials.md
Last active June 22, 2018 01:49
git: command line essentials

Git alias

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

Get remote commits

@askalee
askalee / docker_command_essentials.md
Last active December 30, 2022 00:28
docker: docker command essentials

Folder

├── service1
│   └── Dockerfile
├── service2
│   └── Dockerfile  
├── service3
│   └── Dockerfile  
├── docker-compose.yml
└── docker-compose-dev.yml  
  • 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
@askalee
askalee / gist:c754274d8a2f8eee48cd9abe1d65f4ae
Created February 18, 2019 09:11
Google Spreadsheet Conditional format basd on "mod" on current date cell
=mod( REGEXEXTRACT(text(indirect(address(row(), column())), "yyyy-mm-dd"),"\d+\-(\d+)-\d+"),2)