https://laradock.io/documentation/
For first time use this guide: https://laradock.io/getting-started/
docker ps
<style> | |
html, body { | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
direction: rtl; | |
text-align: right; | |
} | |
.container { |
https://laradock.io/documentation/
For first time use this guide: https://laradock.io/getting-started/
docker ps
#Schema: | |
CREATE TABLE posts(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , title VARCHAR(500) NOT NULL , body TEXT NOT NULL); | |
CREATE TABLE keywords(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR(500) NOT NULL); | |
CREATE TABLE post_keyword(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, post_id int NOT NULL, keyword_id INT NOT NULL ); | |
#Test Data: | |
INSERT INTO posts VALUES (NULL, 'post-title-A', 'This Content Of Post A'), (NULL , 'post-title-B', 'This Content Of Post B'), (NULL , 'post-title-C', 'This Content Of Post C'); | |
INSERT INTO keywords VALUES (NULL, 'keyword-A'), (NULL, 'keyword-B'), (NULL, 'keyword-C'); | |
INSERT INTO post_keyword VALUES (NULL, 1,1), (NULL, 1,2), (NULL, 1,3), (NULL, 2,2), (NULL, 3,1); |
#!/bin/bash | |
# This file depend on jdate command | |
# You can build jdate from source with this guide: https://wiki.ubuntu.ir/wiki/Jcal | |
if [$1 = ] | |
then | |
echo "no files given" | |
exit 0 | |
fi |
const gulp = require('gulp'); | |
const concat = require('gulp-concat'); | |
const rename = require('gulp-rename'); | |
const uglify = require('gulp-uglify'); | |
const stripDebug = require('gulp-config-strip-debug'); | |
const minifyCSS = require('gulp-minify-css'); | |
const babel = require('gulp-babel'); | |
const include = require("gulp-include"); | |
const gutil = require('gulp-util'); |
#!/bin/sh | |
# Detects which OS and if it is Linux then it will detect which Linux Distribution. | |
# Thanks to this contribution that we take it from this site: | |
# http://www.unix.com/unix-for-advanced-and-expert-users/21468-machine.html#post83185 | |
# Test result on ubuntu 14.04 LTS: | |
# Linux Debian jessie/sid ( 3.13.0-32-generic x86_64) | |
OS=`uname -s` | |
REV=`uname -r` | |
MACH=`uname -m` |
DROP FUNCTION IF EXISTS fa2EnDigit; | |
DELIMITER $$ | |
CREATE FUNCTION fa2EnDigit(str TEXT) RETURNS TEXT | |
BEGIN | |
DECLARE t TEXT; | |
SET t = str; | |
SET t = REPLACE(t, '۱', '1'); | |
SET t = REPLACE(t, '۲', '2'); | |
SET t = REPLACE(t, '۳', '3'); | |
SET t = REPLACE(t, '۴', '4'); |
select table_name | |
from information_schema.KEY_COLUMN_USAGE | |
where table_schema = 'database_name' | |
and referenced_table_name = 'table_name'; | |
-- http://stackoverflow.com/questions/754512/mysql-how-do-i-find-out-which-tables-reference-a-specific-table/754582#754582 |
--fix | |
UPDATE post SET body = replace(body, 'ي', 'ی') WHERE body LIKE '%ي%'; | |
--fix | |
UPDATE post SET body = replace(body, 'ك', 'ک') WHERE body LIKE '%ك%'; | |
--find how many post has arabic 'ي' | |
select count(*) from post where body like '%ي%'; | |
--find how many post has arabic 'ك' |