Skip to content

Instantly share code, notes, and snippets.

Remove all tables from a DB in MySQL

Original solution comes from this SO post.

First you need to connect to MySQL:

mysql
@nad0u
nad0u / .gitignore
Created January 20, 2018 16:23 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@nad0u
nad0u / global-gitignore.md
Created January 20, 2018 16:22 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@nad0u
nad0u / install_borg.sh
Created October 1, 2017 13:53
Borgbackup installation on macOSX
#!/bin/sh
brew cask install borgbackup
brew install Caskroom/cask/osxfuse
@nad0u
nad0u / gitignore.txt
Created April 5, 2017 14:02
Gitignore OS generated files
# ============ #
# OS generated #
# ============ #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
@nad0u
nad0u / laravel_commands.md
Created April 4, 2017 08:34
Laravel Commands

Introduction

When cloning a Laravel project from a repo, a number of things need to be done in order to have a working project locally. Here the different steps are mentioned.

Steps

Vendor folder

Create a vendor folder at the root of your project. Once created run the following command to install all dependencies in this folder:

composer install
@nad0u
nad0u / index.html
Created March 1, 2017 16:36
Minimal HTML5 document
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Titre de la page</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
...
@nad0u
nad0u / zip_commands.md
Last active February 9, 2018 12:48
Zip files without .DS_Store and __MACOSX

Zip files without .DS_Store and __MACOSX on macOS

Run the following command into the terminal:

zip -r foldername.zip foldername/* -x "*.DS_Store"