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 schedule = require('node-schedule'); | |
const { TuyaContext } = require('@tuya/tuya-connector-nodejs'); | |
const { exec } = require('child_process'); | |
const answers = { | |
apiKey: 'xxxx', // from tuya | |
apiSecret: 'xxxx' | |
} | |
const deviceId = 'xx'; // from tuya |
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
/////////////////////////////////////////// | |
// /usr/share/X11/xkb/symbols/altwin // | |
/////////////////////////////////////////// | |
// Ctrl is mapped to the Alt, Alt to the Super, and Win to the Ctrl keys. | |
// partial modifier_keys | |
// xkb_symbols "ctrl_alt_win" { | |
// key <LALT> { [ Control_L, Control_L ] }; | |
// key <RALT> { type[Group1] = "TWO_LEVEL", | |
// symbols[Group1] = [ Control_R, Control_R ] }; |
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
server { | |
listen $PORT default_server; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} | |
} |
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
FROM nginx:1.21.0 | |
COPY default.conf.template /etc/nginx/conf.d/default.conf.template | |
COPY nginx.conf /etc/nginx/nginx.conf | |
COPY static-html /usr/share/nginx/html | |
CMD /bin/bash -c "envsubst '\$PORT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf" && nginx -g 'daemon off;' |
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
;= @REM 139 GIT ALIASES FROM ZSH | |
g=git $* | |
ga=git add $* | |
gaa=git add --all $* | |
gapa=git add --patch $* | |
gau=git add --update $* | |
gav=git add --verbose $* | |
gap=git apply $*cl | |
gapt=git apply --3way $* | |
gb=git branch $* |
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
package controller | |
import ( | |
"crypto-service/util" | |
"encoding/json" | |
"fmt" | |
"github.com/gin-gonic/gin" | |
"io/ioutil" | |
"net/http" | |
"net/url" |
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 axios = require('axios'); | |
const empIds = ['72632', '72633', '72634']; | |
const dummyRESTurl = 'http://dummy.restapiexample.com/api/v1/employee/'; | |
const result = []; | |
//Serial | |
(async () => { | |
for (let i = 0; i < empIds.length; i++) { | |
const body = await axios.get(`${dummyRESTurl}${empIds[i]}`); |
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 axios = require('axios'); | |
const empIds = ['72632', '72633', '72634']; | |
const dummyRESTurl = 'http://dummy.restapiexample.com/api/v1/employee/'; | |
let promises = []; | |
empIds.forEach((empID, i)=>{ | |
promises.push(axios.get(`${dummyRESTurl}${empID}`)); | |
}) |
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 request = require('request'); | |
const empIds = ['72632', '72633', '72634']; | |
const dummyRESTurl = 'http://dummy.restapiexample.com/api/v1/employee/'; | |
const result = []; | |
let count = 0; | |
empIds.forEach((empID, i)=>{ | |
request(`${dummyRESTurl}${empID}`, (err, resp, body)=>{ | |
result.push(JSON.parse(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
var http = require('http'); | |
var request = require('request'); | |
var env = process.env.NODE_ENV; | |
var bunyan = require('bunyan'); | |
const uuidV1 = require('uuid/v1'); | |
var logenv = process.env.LOG_ENV; | |
var fileName = 'Utils'; | |
var externalApiParams; | |
if(env){ | |
fileName += '_'+env; |