Skip to content

Instantly share code, notes, and snippets.

View tranphuoctien's full-sized avatar
🎯
Focusing

Tien Tran tranphuoctien

🎯
Focusing
View GitHub Profile
@tranphuoctien
tranphuoctien / linux_deploy_update
Created October 31, 2018 07:58
Restaff Linux update images
#!/bin/bash
shopt -s extglob
#echo -n "Username: ";
#read username;
#echo -n "Password: ";
#Disabling echo, so that password will not be visible on screen
#read -s password
#Enabling echo
echo "";
echo -n "Location deploy in: ";
@tranphuoctien
tranphuoctien / data_test
Last active November 9, 2018 11:54
data_test.json
1234
({
"request_id": 12453,
"response_params": [{
"allcount": 10,
"curcount": 3,
"device_id": 263,
"rid": -1,
"picname": "",
"profileid": "0104",
@tranphuoctien
tranphuoctien / brazn_main_let_on
Last active November 13, 2018 05:38
Brazn device test Mainlet
1234
({
"request_id":1234,
"response_params":{
"ieee":"00137A000003F189",
"ep":"01",
"operatortype":0,
"param1":1,
"param2":2,
"param3":3
@tranphuoctien
tranphuoctien / IEEE List
Created November 14, 2018 04:50
IEEE List device
000000 XEROX CORPORATION
000001 XEROX CORPORATION
000002 XEROX CORPORATION
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
@tranphuoctien
tranphuoctien / getwaydb
Last active November 16, 2018 03:32
netvox example data
1234
({
"request_id": "1234",
"response_params": [
{
"allcount": 24,
"curcount": 1,
"house_ieee": "00137A0000012EDD",
"device_id": 7,
"rid": -1,
@tranphuoctien
tranphuoctien / flcrm.yaml
Last active August 19, 2019 08:12
flcrm.yaml
port: 9000
log :
file: /tmp/users.log
level: debug
jwt_secret": secret
database:
mongo:
host: localhost
uri: mongodb://admin:*@qcoop-cluster0-shard-00-00-ty5r7.gcp.mongodb.net:27017,qcoop-cluster0-shard-00-01-ty5r7.gcp.mongodb.net:27017,qcoop-cluster0-shard-00-02-ty5r7.gcp.mongodb.net:27017/test?replicaSet=QCOOP-Cluster0-shard-0&authSource=admin
name: LogSystem
@tranphuoctien
tranphuoctien / docker-compose.yml
Created December 18, 2018 04:19
fork depoyment
version: '3'
services:
# The Application
brazn-php:
image: restaff/brazn-php
working_dir: /var/www
volumes:
- /var/www/storage
environment:
DB_HOST: brazn-mysql
@tranphuoctien
tranphuoctien / output
Created January 23, 2019 07:25
proto3 to json
json output ==> {"name":"Allen","age":30,"married":true,"f":14500.6}
name: "Allen"
age: 30
married: true
f: 14500.6
@tranphuoctien
tranphuoctien / searchcar.php
Last active July 23, 2019 11:30
Filter pipeline mongodb
<?php
public function getFilterVehiclesV2($currentPage = 1, $pageSize = 10, $filterData, $sortData)
{
$stageFilter = [];
if (count($filterData->make_model['make']) > 0 || $filterData->make_model['model']) {
$stageFilter[] = [
'$or' => [
[