This file contains 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
alias vsc='powershell.exe "Start code -n ."' |
This file contains 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 | |
if systemctl restart nginx; then | |
echo Ok | |
else | |
systemctl status nginx.service --no-pager --full | |
fi |
This file contains 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
# Run process wuth given name | |
bash -c "exec -a MyUniqueProcessName <command> &" | |
# Kill process by name | |
pkill -f "MyUniqueProcessName" | |
# Show tree of processes with pids | |
pstree -p | |
# Install pstree to debian |
This file contains 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
# Run "run" script silent and disowned | |
./run 1>/dev/null 2>/dev/null & disown |
This file contains 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
# get pub and priv keys if dont have yet on local machine | |
ssh-keygen -t rsa | |
# paste id_pub key to .ssh/authozied_keys on remote machine |
This file contains 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
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout | |
Scancode Map REG_BINARY | |
00 00 00 00 00 00 00 00 | |
06 00 00 00 01 00 3A 00 | |
00 00 00 00 |
This file contains 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
[HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response] | |
"AutoRepeatDelay"="200" | |
"AutoRepeatRate"="6" | |
"DelayBeforeAcceptance"="0" | |
"Flags"="59" | |
"BounceTime"="0" | |
https://superuser.com/questions/1058474/increase-keyboard-repeat-rate-beyond-control-panel-limits-in-windows-10 |
This file contains 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
# Disable fast-forward merge for all projects | |
git config --global --add merge.ff false |
This file contains 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
--- Основные ветки -------------------------------- | |
master - production-ready ветка | |
develop - все изданные изменения (фичи и хотфиксы) | |
--- Вспомогательные ветви ------------------------- | |
--- Feature --------------------------------------- | |
feature branch - существует для добавления новой фичи | |
#Создать |
This file contains 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
public static Vector3 GetWorldPointFromMouse(bool plane = true, float planeLevel = 0) | |
{ | |
var groundPlane = new Plane(Vector3.up, new Vector3(0, planeLevel, 0)); | |
var ray = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition); | |
RaycastHit rayHit; | |
Vector3 hit = new Vector3(); | |
float dist; | |
if(plane) |
NewerOlder