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
version: '2' | |
services: | |
mariadb: | |
restart: always | |
image: docker.io/bitnami/mariadb:10.6 | |
environment: | |
# ALLOW_EMPTY_PASSWORD is recommended only for development. | |
- ALLOW_EMPTY_PASSWORD=yes | |
- MARIADB_USER=bn_phpbb | |
- MARIADB_DATABASE=bitnami_phpbb |
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
const mysql = require('C:/Users/Admin/AppData/Roaming/npm/node_modules/mysql'); | |
console.log(mysql); | |
var con = mysql.createConnection({ | |
host: "localhost", | |
user: "root", | |
password: "", | |
database : 'lampart' | |
}); | |
con.query('select * from lp_users',(error, results, fields)=>{ | |
console.log(results[0].user_login); |
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
const redis = require("redis"); | |
const express = require("express"); | |
console.log(redis); | |
const port_redis = 6379; | |
const redis_client = redis.createClient(port_redis); | |
const app = express() | |
var io = require('socket.io-client') ; |
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
// Vào một ngày đẹp trời tôi có nhã hứng muốn chọn file và hiện thị preview lên giao diện ngay lập tức. Sau đây là code thực hiện. | |
<img> | |
<input type="file"> | |
<script | |
src="https://code.jquery.com/jquery-3.4.1.js" | |
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" | |
crossorigin="anonymous"></script> | |
<script> | |
$("input[type=file]").on('change', function () { | |
var preview = document.querySelector('img'); // Image reference |
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
$link = 'http://nhonha.vihan.net/San-pham/HANG-NOI-THAT-77/?min_price=200000000&max_price=4000000'; | |
preg_match('/min_price=(.+)&max_price=(.+)/', $link, $match); | |
var_dump($match); | |
/// OUT PUT | |
array(3) { |
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
<video id="my_video" autoplay="" loop="" muted="" style="margin-top: -45px; opacity: 1;"> | |
<source src="http://shop1.wds.com.vn/wp-content/themes/pshop01/images/video.mp4" type="video/mp4"> | |
</video> |
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
const WebSocket = require('ws'); | |
const https = require('https'); | |
const request = require('request'); | |
const wss = new WebSocket.Server({ port: 8686 }); | |
wss.broadcast = function broadcast(data) { | |
wss.clients.forEach(function each(client) { |
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
```php | |
<?php | |
namespace App\Libs; | |
/** | |
HTU: | |
define('KEY_CHATWORK', ''); | |
$cw = new \App\Libs\ChatworkLib; | |
$cw->setRoomId('119727315'); | |
$cw->setMsg($e->getMessage()); |
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
``` | |
$("#issue_tree").before("<input class='jobtype' type='checkbox' data-color='true' id='div_coloring'><label for='div_coloring'>Coloring</label>"); | |
$("#issue_tree").before("<input class='jobtype_hideall' type='button' data-ele='HideAll' id='div_9' value='HideAll'>"); | |
$("#issue_tree").before("<input class='jobtype_hideallother' type='button' data-ele='HideAll' id='div_9' value='HideAll other'>"); | |
$("#issue_tree").before("<input class='jobtype_remove' type='checkbox' data-ele='Closed' id='div_1'><label for='div_1'>Closed</label>"); | |
$("#issue_tree").before("<input class='jobtype_remove' type='checkbox' data-ele='In Progress' id='div_2'><label for='div_2'>In Progress</label>"); | |
$("#issue_tree").before("<input class='jobtype_remove' type='checkbox' data-ele='Paused' id='div_3'><label for='div_3'>Paused</label>"); |
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
now=$(date +%Y%m%d_%H%M%S) | |
find . > Logs/filename_$now.txt | |
cp Logs/filename_$now.txt 'Transcend - green.txt' |
NewerOlder