-
Install Neovim >> Neovim Docs
-
Install Vim Plug >> Vim Plug Repository
-
Copy-paste the following
init.vim
to~/.config/nvim/init.vim
-
Create a directory
~/.cache/vim_gutentags
This file contains 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
1. Copy the .sql file | |
`docker cp /path/to/file.sql container_name:/copied_file.sql` | |
2. Remote the container | |
`docker exec -it container_name bash` | |
3. Import the database | |
`mysql -u username -p dbname < copied_file.sql` |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="./css/tailwind.css"> | |
</head> | |
<body> |
This file contains 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
class SearchBar extends HTMLElement { | |
connectedCallback() { | |
this.render(); | |
} | |
set clickEvent(event) { | |
this._clickEvent = event; | |
this.render(); | |
} |
This file contains 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
# To enable CORS you should add lines with CORS rules below to your valet.conf file | |
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx | |
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory | |
# after you edit your valet.conf do not forget to execute `valet restart` | |
server { | |
listen 80 default_server; | |
root /; | |
charset utf-8; | |
client_max_body_size 128M; |
This file contains 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
#!/bin/bash | |
####################################### | |
# Variables # | |
# source : https://askubuntu.com/questions/865792/how-can-i-monitor-the-tbw-on-my-samsung-ssd | |
####################################### | |
SSD_DEVICE="/dev/sda" | |
ON_TIME_TAG="Power_On_Hours" |
This file contains 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
$('#__formAddMenu').submit(function() { | |
var checked_nodes = []; | |
checked_nodes = $('#__containerMenu').jstree('get_checked'); | |
$("#__containerMenu").find(".jstree-undetermined").each( | |
function(i, element) { | |
checked_nodes.push( $(element).closest('.jstree-node').attr("id") ); | |
} | |
); |
This file contains 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
var ajaxReturn; | |
var ajaxAction = function(type, url, data, submitText) { | |
if(typeof(data) == 'object') | |
{ | |
$.ajax({ | |
type: type, | |
url: base_ajax+'/'+url, | |
data: data, | |
async: false, |
This file contains 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
$min-phone: 320px; | |
$med-phone: 480px; | |
$med-phone-1: 481px; | |
$max-phone: 767px; | |
$min-tablet: 768px; | |
$max-tablet: 991px; | |
$min-desktop: 992px; | |
$med-desktop: 1200px; |
This file contains 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
#!/bin/bash | |
## Create 'backup' mysql user | |
# CREATE USER 'backup'@'localhost' IDENTIFIED BY 's3cr3t'; | |
# GRANT EVENT, LOCK TABLES, PROCESS, REFERENCES, SELECT, SHOW DATABASES, SHOW VIEW, TRIGGER ON *.* TO 'backup'@'localhost' ; | |
USER="backup" | |
PASSWORD="backup_pwd" | |
OUTPUTDIR=$(dirname $0)"/databases" | |
MYSQLDUMP="/usr/bin/mysqldump" |
NewerOlder