This file contains hidden or 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 updateDistrict = async (id, diachi_vn, diachi_en) => { | |
| const request = await fetch( | |
| `http://103.237.147.12:8090/KhoiTaoToaNha/PNG_1TCHUNG_XEM_CT?id=${id}`, | |
| { | |
| headers: { | |
| accept: "application/json, text/javascript, */*; q=0.01", | |
| "accept-language": "en-US,en;q=0.9,es;q=0.8,ja;q=0.7", | |
| "content-type": "application/json; charset=utf-8", | |
| "x-requested-with": "XMLHttpRequest", | |
| }, |
This file contains hidden or 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 | |
| MY_MONTH =$1 | |
| if [[ $MY_MONTH == [0-9][0-9][0-9][0-9][0-1][0-9] ]] | |
| then | |
| redis-cli -h 10.120.53.56 -p 8005 --scan --pattern "ut.game.key.number.turn.daily:*:${MY_DATE}*:*" | xargs redis-cli -h 10.120.53.56 -p 8005 DEL | |
| redis-cli -h 10.120.53.56 -p 8005 --scan --pattern "ut.game.key.gift.total.received.by.date:*:${MY_DATE}*:*" | xargs redis-cli -h 10.120.53.56 -p 8005 DEL | |
| redis-cli -h 10.120.53.56 -p 8005 --scan --pattern "ut.game.key.gift.total.daily.by.date:*:*:${MY_DATE}*" | xargs redis-cli -h 10.120.53.56 -p 8005 DEL |
This file contains hidden or 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
| # 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 | |
This file contains hidden or 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. Get nodejs in homepage and push to server) | |
| 2. tar -xvf node-v6.11.0-linux-x64.tar.gz | |
| 3. set soft link | |
| ln -s /path/to/node-v6.11.0-linux-x64/bin/node /usr/bin/node | |
| ln -s /path/to/node-v6.11.0-linux-x64/bin/npm /usr/bin/npm | |
| ln -s /path/to/node-v6.11.0-linux-x64/bin/node /usr/local/bin/node | |
| ln -s /path/to/node-v6.11.0-linux-x64/bin/npm /usr/local/bin/npm |
This file contains hidden or 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. Push file https://gitlab.com/nartoan/client-oracle/-/blob/master/instantclient-basic-linux.x64-12.2.0.1.0.zip to server | |
| 2. Unzip file | |
| 3. Set environment for nodejs app (LD_LIBRARY_PATH: /path/to/instantclient_12_2) |
This file contains hidden or 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 { promisify } = require("util"); | |
| const store = redis.createClient({ | |
| port: process.env.REDIS_PORT, | |
| host: process.env.REDIS_HOST, | |
| }); | |
| store.on('connect', () => { | |
| console.log('Client connected to redis...') |
This file contains hidden or 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
| $LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound) |
This file contains hidden or 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 | |
| jobs: | |
| build: | |
| docker: | |
| - image: circleci/node:7.10 | |
| working_directory: ~/app | |
| steps: | |
| - checkout | |
| - restore_cache: |
This file contains hidden or 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
| http://googglet.com/scripts/api/vid?req=1&u={url} | |
| http://googglet.com/scripts/api/vid?req=2&u={url} | |
| http://translate.google.com/translate_tts?ie=UTF-8&q={encodeURI(text)} |