This file contains hidden or 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
import pyautogui | |
import time | |
while True: | |
pyautogui.moveRel(0, 10) | |
time.sleep(2) |
This file contains hidden or 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
--create database for testing rollback | |
create database if not exists dmstest; | |
use dmstest; | |
create table people( | |
id int auto_increment |
This file contains hidden or 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
1. Create tables to hold data for your movie collection. | |
Create table Movies (id int identity primary key, | |
Title varchar (100), | |
Director varchar (100), | |
Runtime smallint, --Consider naming this runtime_minutes (this makes it clear as to the units) | |
Genre_id int, | |
Release_Year year); | |
This file contains hidden or 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
#To display the largest folders/files including the sub-directories, run: | |
du -Sh | sort -rh | head -5 | |
#du command: Estimate file space usage. | |
#-h : Print sizes in human-readable format (e.g., 10MB). | |
#-S : Do not include the size of subdirectories. | |
#-s : Display only a total for each argument. | |
#sort command : sort lines of text files. | |
#-r : Reverse the result of comparisons. |
This file contains hidden or 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
1. Create tables to hold data for your movie collection. | |
Create table Movies (id int identity primary key, | |
Title varchar (100), | |
Director varchar (100), | |
Runtime smallint, | |
Genre_id int, | |
Release_Year year); | |
Create table Genre (id int identity primary key, |
This file contains hidden or 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
SELECT | |
c.relname, | |
indexname, | |
c.reltuples AS num_rows, | |
pg_size_pretty(pg_relation_size(quote_ident(c.relname)::text)) AS table_size, | |
pg_size_pretty(pg_relation_size(quote_ident(indexrelname)::text)) AS index_size, | |
CASE WHEN indisunique THEN 'Y' | |
ELSE 'N' | |
END AS UNIQUE, | |
idx_scan AS number_of_scans, |
This file contains hidden or 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
CREATE INDEX index_notifications_gin_subscriber ON notifications USING gin ((params ->> 'subscriber') gin_trgm_ops) WHERE params -> 'subscriber':: text IS NOT NULL; |
This file contains hidden or 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
myaliases = { | |
# 'grep': 'grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}', | |
# one char shortcuts | |
'h': 'history show all | less', | |
'c': 'clear', | |
# ls shortcuts | |
'l': 'ls -F', | |
'la': 'ls -lAfh', | |
'll': 'ls -lFh', | |
'ldot': 'ls -ld .*', |
This file contains hidden or 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
pg_config --version|grep -oP "(?<=PostgreSQL ).*" |
NewerOlder