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
# see fstrim status | |
systemctl status fstrim.timer | |
# temporal files to ram in /etc/fstab | |
tmpfs /tmp tmpfs noatime,nodiratime,nodev,nosuid,mode=1777,size=1G,defaults 0 0 | |
tmpfs /var/tmp tmpfs noatime,nodiratime,nodev,nosuid,mode=1777,size=1G,defaults 0 0 | |
# add noatime to ssd root partition in /etc/fstab | |
/dev/mapper/kubuntu--vg-root / ext4 noatime,errors=remount-ro 0 1 |
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
/*** update sequences ***/ | |
select setval('seqname',(select max(id) from tablename)); | |
/*** restore backup ***/ | |
psql.exe -h [host] -p [port] -d [database] -U [user] -f "c:\\path\\to\\file" | |
/*** find tables with FKs to a table ***/ | |
select R.TABLE_NAME,r.constraint_schema | |
from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE u | |
inner join INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS FK |
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] | |
cm = commit | |
mg = merge | |
br = branch | |
co = checkout | |
st = status | |
lg = log "--pretty=format:'%ad | %s%C(yellow bold)%d%Creset %Cgreen[%an]' --graph --date=short" |
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
/******** table descriptions & check constrints ********/ | |
select obj.name | |
,prop.value | |
,obj.type_desc | |
from sys.extended_properties as prop | |
inner join sys.objects obj on | |
obj.object_id = prop.major_id | |
where minor_id = 0 | |
and prop.name = 'MS_Description' |
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
function _fancy_prompt { | |
local RED="\[\033[01;31m\]" | |
local YELLOW="\[\033[01;33m\]" | |
local BLUE="\[\033[01;34m\]" | |
local WHITE="\[\033[00m\]" | |
local GREEN="\[\033[36m\]" | |
local GREEN2="\[\033[32m\]" | |
local PROMPT="" |
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
[Desktop Entry] | |
Type=Application | |
Name=myAppName | |
Icon=~/myApp/icon.xpm | |
Exec=~/myApp/launcher | |
Comment=brief description | |
Categories=Development;IDE; | |
Terminal=false |