Skip to content

Instantly share code, notes, and snippets.

@tepajc
tepajc / drop-table
Created April 29, 2024 02:27 — forked from sohelamin/drop-table
Laravel drop tables via artisan command
php artisan tinker
$tables = DB::select('SHOW TABLES');
$tables_in_database = "Tables_in_".Config::get('database.connections.mysql.database');
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
foreach ($tables as $table) {
Schema::drop($table->$tables_in_database);
}
@tepajc
tepajc / mysql_backup.sh
Created September 10, 2022 03:01 — forked from zhiephie/mysql_backup.sh
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am
@tepajc
tepajc / semantic-commit-messages.md
Created September 10, 2022 02:49 — forked from zhiephie/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example