Cheatsheet

This is a cheatsheet I use to remember the stuff that I seem to forget.

Website Design Tools

Powershell

  • Show contents of filename
Get-Content *filename*
  • View file in powershell
cat <<filename>>
  • View all files, folder and subfolders
tree -f
  • Rename a file
Rename-Item c:\scripts\test.txt testing.js

Command Prompt

  • Rename a file
ren filename newname
ren *.htm *.html

Terminal

  • Rename a file
mv test.txt testing.js

Docker

docker version  --  
docker info     --  
docker ps       -- view containers  
docker start myContainer  
docker stop myContainer 

Docker Parallels

Github > Parallels > docker-machine-parallels

docker-machine create --driver=parallels --parallels-memory=4000 prl-dev

Database

sqlcmd

sqlcmd

sqlcmd -S localhost -U sa -P 'P@55w0rd'
SELECT Name from sys.Databases;
CREATE DATABASE testdb;
GO
USE testdb;
GO
CREATE TABLE inventory (id INT, name NVARCHAR(50), quantity INT);
GO
INSERT INTO inventory VALUES (1, 'banana', 150);
INSERT INTO inventory VALUES (2, 'orange', 154);
GO
SELECT * FROM inventory WHERE quantity > 152;
GO
QUIT

mssql

mssql

npm install -g sql-cli
mssql -h
mssql -u sa -p P@55w0rd
mssql> .databases
mssql> .help
mssql> use test;
mssql> .search col ID
mssql> .search text john
mssql> .quit