sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
#!/bin/bash | |
# Copyright (c) 2021 Soumya Deb <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
CREATE TABLE IF NOT EXISTS `municipios` ( | |
`id` int(7) NOT NULL, | |
`estado` varchar(19) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`uf` char(2) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`municipio` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
INSERT INTO `municipios` (`id`, `estado`, `uf`, `municipio`) VALUES | |
(1100015, 'Rondônia', 'RO', 'Alta Floresta D\'Oeste'), |
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); | |
} |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
[ | |
["Acre", "AC"], | |
["Alagoas", "AL"], | |
["Amazonas", "AM"], | |
["Amapá", "AP"], | |
["Bahia", "BA"], | |
["Ceará", "CE"], | |
["Distrito Federal", "DF"], | |
["Espírito Santo", "ES"], | |
["Goiás", "GO"], |
#! /usr/bin/env bash | |
set -euo pipefail | |
_usage() { | |
echo " | |
Usage: | |
git-force-clone -b branch remote_url destination_path | |
Example: |
Possible values for ext-name: | |
bcmath | |
bz2 | |
calendar | |
ctype | |
curl | |
dba | |
dom | |
enchant |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() |