Set Upstream branch for a git branch
git branch --set-upstream-to=origin/feat-foobar
Set Upstream branch for a git branch
git branch --set-upstream-to=origin/feat-foobar
{ | |
"always_show_minimap_viewport": true, | |
"block_caret": true, | |
"color_scheme": "Packages/Color Scheme - Default/Mariana.sublime-color-scheme", | |
"detect_indentation": true, | |
"draw_white_space": "all", | |
"font_size": 11, | |
"hot_exit": true, | |
"ignored_packages": ["Vintage"], | |
"theme": "Default.sublime-theme", |
MAJOR.MINOR.PATCH, increment the:
0.1.0
All possibilities
new RegExp('word')).test(str) // ES2
str.indexOf('word') !== -1 // ES2
str.includes('word') // ES6
str.match(/word/gi)?.length > 0 //ES2019
Table:
Purpose | Command | Remark |
---|---|---|
Move line up/down | Alt + Up Arrow/Down Arrow |
If you're from a sublime background like me, this is the equivalent for ctrl + shift in Sublime. |
Jump to matching bracket | Ctrl+Shift+\ | Chrome's ctrl + m equivalent or Sublime's ctrl + <bracket> |
Indent/outdent line | Ctrl + ] or [ |
-- |
Duplicate line | Going to the end of the line and then doing Ctrl + C followed by Ctrl + V |
This is Sublime or Atom's Ctrl + D equivalent |
img.src = document.getElementById('canvas').toDataURL();
// src will look like data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNb...
canvas.toDataURL('image/jpeg', 1.0); // full
canvas.toDataURL('image/jpeg', 0.5); // medium
canvas.toDataURL('image/jpeg', 0.1); // low
Remember this as a mantra: "Escape, Colon, Doublewww, Queue", Esc
+ :
+ w
+ q
git branch
)git rev-parse --abbrev-ref HEAD
more: https://bigfatsoftwareinc.wordpress.com/2021/01/25/how-to-determine-which-git-branch-youre-on/
git log --format=%B -n 1 <revision>
git log --format=%B -n 1 HEAD
sudo service apache2 start
sudo service apache2 stop
sudo service apache2 restart
sudo systemctl enable apache2
sudo systemctl disable apache2
(works on ubuntu 16.04 or later which use systemd
)
sudo service postgresql start
sudo service postgresql stop
sudo service postgresql restart
sudo systemctl enable postgresql
sudo systemctl disable postgresql