c9search NPM运行别名

npm运行的Windows别名

nr.cmd
@echo off

:loop
      ::-------------------------- has argument ?
      if ["%~1"]==[""] (
        echo Available NPM Tasks.
        call npm run
        goto end
      )
      ::-------------------------- argument exist ?
      if not exist %~s1 (
        echo Running NPM
	call npm run "%~1"
      ) else (
        echo exist
      )
      ::--------------------------
      shift
      goto loop

:end

c9search mysql命令

mysql command.cmd
# To connect to a database:
mysql database_name
 
# To connect to a database, user will be prompted for a password:
mysql -u user --password database_name
 
# To connect to a database on another host:
mysql -h database_host database_name
 
# To connect to a database through a Unix socket:
mysql --socket path/to/socket.sock
 
# To execute SQL statements in a script file (batch file):
mysql database_name < script.sql
 
# ---
 
# To connect to a database
$ mysql -h localhost -u root -p
 
# To backup all databases
$ mysqldump --all-databases --all-routines -u root -p > ~/fulldump.sql
 
# To restore all databases
$ mysql -u root -p  < ~/fulldump.sql
 
# Create database with utf-8 collation and utf-8 charset
$ mysql> create database <database_name> character set utf8 collate utf8_general_ci;
 
# Create a table with an auto-incrementing primary key (id), w/ utf-8
$ mysql> create table <table_name> (`id` int unsigned auto_increment, primary key (`id`)) default character set utf8 collate utf8_general_ci;
 
# List all databases on the sql server.
$ mysql> show databases;

# To dump a database to a file (Note that your password will appear in your command history!):
mysqldump -uusername -ppassword the-database > db.sql
 
# To dump a database to a file:
mysqldump -uusername -p the-database > db.sql
 
# To dump a database to a .tgz file (Note that your password will appear in your command history!):
mysqldump -uusername -ppassword the-database | gzip -9 > db.sql
 
# To dump a database to a .tgz file:
mysqldump -uusername -p the-database | gzip -9 > db.sql
 
 # To dump all databases to a file (Note that your password will appear in your command history!):
mysqldump -uusername -ppassword --all-databases > all-databases.sql
 
# To dump all databases to a file:
mysqldump -uusername -p --all-databases > all-databases.sql
 
# To export the database structure only:
mysqldump --no-data -uusername -p the-database > dump_file
 
# To export the database data only:
mysqldump --no-create-info -uusername -p the-database > dump_file