Table of Contents
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
# Script: update-moodle.sh | |
# From: https://gist.github.com/ | |
# This script will update Moodle within the same major version (example: 3.6.1 to 3.6.3). | |
# The nice thing about this simple approach is that it won't affect your plugins. | |
# Assumes you used "git clone" to create and install your instance of Moodle. If you did not, don't use this script! | |
# | |
# Copyright TNG Consulting Inc. | |
# Author: Michael Milette - <www.tngconsulting.ca> | |
# Release: 1.0 Alpha - 2019-04-16 | |
# |
Description | MySQL | PostgreSQL |
---|---|---|
Connect to database server | mysql -u username -p | psql -U username |
Import a database | mysql -u username -p databaseName < data.sql | psql -U username databaseName < data.sql |
List databases | SHOW databases; | \l |
Use/Connect to datbase with name | USE databaseName; | \c databaseName |
List tables | SHOW tables; | \dt |
List users | SELECT user, host FROM mysql.user; | \du |
- See git cheatsheet.
- rsync -a --delete --compress --omit-dir-times --omit-link-times --no-g --no-perms [user@server:]source [user@server:]target
- scp -Crqp [user@server:]source [user@server:]target
- ssh username@server
- tmux (Ctrl+b ":set -g status off" to disable status bar with clock)
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
OS="$(uname -s)" | |
case "${OS}" in | |
Linux*) OS=Linux;; | |
Darwin*) OS=Mac;; | |
CYGWIN*) OS=Cygwin;; | |
MINGW*) OS=MinGw;; | |
*) if [[ -n "$IS_WSL" || -n "$WSL_DISTRO_NAME" ]]; then | |
OS="UNKNOWN:${OS}" | |
else | |
# WSL2 |
OlderNewer