Reorganize

This commit is contained in:
oleg20111511
2026-03-02 19:15:17 +02:00
parent 9192716bfb
commit f235a35ebb
610 changed files with 1 additions and 0 deletions
@@ -0,0 +1,99 @@
// Editing
{ "keys": ["ctrl+u"], "command": "soft_undo" },
{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+k", "ctrl+v"], "command": "paste_from_history" },
{ "keys": ["alt+."], "command": "close_tag" },
{ "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
{ "keys": ["ctrl+shift+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
{ "keys": ["ctrl+shift+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+shift+j"], "command": "join_lines" },
{ "keys": ["ctrl+t"], "command": "transpose" },
{ "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
{ "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },
{ "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
// Moving
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["ctrl+k", "ctrl+d"], "command": "find_under_expand_skip" },
{ "keys": ["ctrl+m"], "command": "move_to", "args": {"to": "brackets"} },
{ "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
{ "keys": ["ctrl+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+;"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"} },
{ "keys": ["f12"], "command": "goto_definition" },
{ "keys": ["ctrl+f12"], "command": "goto_definition", "args": {"side_by_side": true, "clear_to_right": true} },
{ "keys": ["shift+f12"], "command": "goto_reference" },
{ "keys": ["ctrl+shift+f12"], "command": "goto_reference", "args": {"side_by_side": true, "clear_to_right": true} },
{ "keys": ["alt+-"], "command": "jump_back" },
{ "keys": ["alt+shift+-"], "command": "jump_forward" },
{ "keys": ["f3"], "command": "find_next" },
{ "keys": ["shift+f3"], "command": "find_prev" },
{ "keys": ["ctrl+f3"], "command": "find_under" },
{ "keys": ["ctrl+shift+f3"], "command": "find_under_prev" },
{ "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },
// Selecting
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
{ "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
{ "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "smart"} },
{ "keys": ["ctrl+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["alt+f3"], "command": "find_all_under" },
// Bookmarks
{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" },
// Marks
{ "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
{ "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
{ "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
{ "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
{ "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
// Layouts
{"keys": ["alt+shift+1"], "command": "set_layout",},
{ "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+0"], "command": "focus_side_bar" },
{ "keys": ["ctrl+k", "ctrl+up"], "command": "new_pane" },
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "new_pane", "args": {"move": false} },
{ "keys": ["ctrl+k", "ctrl+down"], "command": "close_pane" },
{ "keys": ["ctrl+k", "ctrl+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+right"], "command": "focus_neighboring_group" },
{ "keys": ["ctrl+k", "ctrl+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "move_to_neighboring_group" },
// Tabs
{ "keys": ["alt+1"], "command": "select_by_index", "args": { "index": 0 } },
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+pagedown"], "command": "next_view" },
{ "keys": ["ctrl+shift+pagedown"], "command": "next_view", "args": {"extend": true} },
{ "keys": ["ctrl+pageup"], "command": "prev_view" },
{ "keys": ["ctrl+shift+pageup"], "command": "prev_view", "args": {"extend": true} },
{ "keys": ["ctrl+j", "ctrl+up"], "command": "unselect_others" },
{ "keys": ["ctrl+j", "ctrl+left"], "command": "unselect_to_left" },
{ "keys": ["ctrl+j", "ctrl+right"], "command": "unselect_to_right" },
{ "keys": ["ctrl+j", "ctrl+shift+left"], "command": "select_to_left" },
{ "keys": ["ctrl+j", "ctrl+shift+right"], "command": "select_to_right" },
{ "keys": ["ctrl+j", "ctrl+pageup"], "command": "focus_to_left" },
{ "keys": ["ctrl+j", "ctrl+pagedown"], "command": "focus_to_right" },
{ "keys": ["alt+1"], "command": "focus_by_index", "args": { "index": 0 },
"context": [{ "key": "group_has_multiselect", "operator": "equal", "operand": true }]
},
??
{ "keys": ["f9"], "command": "sort_lines", "args": {"case_sensitive": false} },
{ "keys": ["ctrl+f9"], "command": "sort_lines", "args": {"case_sensitive": true} },
+124
View File
@@ -0,0 +1,124 @@
LOG:
elements limit:
git log -2
patch:
git log -p
oneline:
git log --pretty=oneline
filters:
git log --since=2.weeks --author=trilolol --grep=keywords
function:
git log -S function_name
branches logging:
git log --decorate
or
git branch
Config:
levels:
git config --local
git config --global
git config --system
remove entry:
git config --unset <key>
replace working directory on push:
git config receive.denyCurrentBranch updateInstead
Changes:
git status
Diff indexed - working dir:
git diff
Diff indexed - commit:
git diff --staged (или --cached)
Tools:
git difftool --tool-help
git difftool --tool=<smerge>
git difftool
Commits:
commit with message
git commit -m "message"
autoindex:
git commit -a
inlude current index in previous commit:
git commit --amend
Remove files:
Remove from repository:
git rm <file>
Remove from index:
git rm --cached <file>
Unindex:
git reset -- <file>
Move sequence (rm-add):
git mv <from> <to>
Revert changes:
git checkout -- <file>
Branches:
new branch:
git checkout -b <branch name>
или:
git branch <branch name>
или:
git switch -c <branch name>
switch branch:
git checkout <branch name>
или:
git switch <branch name>
Merging:
step 1, switch to original branch:
git switch master
step 2, run command specifying branch that will be merged in original:
git merge hotfix
conflicts:
git mergetool
Remote:
add:
git remote add <name> <url>
git remote add name trilolol@example.com:/var/www/folder
rename:
git remote rename <name1> <name2>
upload updates:
git push <name> <branch>
download updates
git pull <name> <branch>
+41
View File
@@ -0,0 +1,41 @@
add submodule:
git submodule add [url]
config:
diff:
git config --global diff.submodule log
(git diff --submodule)
status:
git config status.submodulesummary 1
submodule commands:
git config submodule.recurse true
cloning:
git clone [url]
git submodule init
git submodule update / git submodule update --init
or
git clone --recurse-submodules [url]
change branch:
git config -f .gitmodules submodule.[name].branch [branch]
fetch updates for submodules
git submodule update --remote [name] (first update)
git submodule update --init --recursive (update all)
git submodule update --remote --merge (fetch and merge)
git pull --recurse-submodules
in case url changed:
git submodule sync --recursive
upload updates for submodules:
git push --recurse-submodules=(check/on-demand)
other:
git submodule foreach '[command]'
+7
View File
@@ -0,0 +1,7 @@
wifi:
https://raspberrypi.stackexchange.com/questions/109425/ubuntu-server-18-wifi-hotspot-setup
permissions filter:
directory - find ./ -type d -exec chmod 775 {} \;
file - find ./ -type f -exec chmod 664 {} \;
+6
View File
@@ -0,0 +1,6 @@
adduser oleg20111511
sudo usermod -a -G sudo oleg20111511
ssh-copy-id
chgrp oleg20111511 /var/www
+18
View File
@@ -0,0 +1,18 @@
install:
sudo apt install mysql-server
sudo apt install libmysqlclient-dev
user creation:
CREATE USER 'socialstore' IDENTIFIED BY 'socialstorepassword';
SELECT user FROM mysql.user;
database creation:
CREATE DATABASE StoreDatabase;
GRANT ALL PRIVILEGES ON StoreDatabase.* TO socialstore;
database management:
USE StoreDatabase;
SHOW TABLES;
installation:
+17
View File
@@ -0,0 +1,17 @@
Start:
su postgres
psql
Show databases:
\l
Switch to database:
\c [name]
Show tables
\dt
Create new database and user:
create database mydb;
create user myuser with encrypted password 'mypass';
grant all privileges on database mydb to myuser;