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 ethSigUtil = require("@metamask/eth-sig-util"); | |
const address = '0x0'; | |
const message = 'Hi I am 0x0'; | |
const signature = '0x0'; | |
let checkSignature = (data, signature) => { | |
const params = { | |
data, | |
signature |
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 { ThirdwebSDK } = require('@3rdweb/sdk'); | |
const { ethers } = require("ethers"); | |
const fs = require('fs'); | |
const request = require('./request'); | |
const getUnsplashImg = async () => { | |
let img = await request.unsplash(); | |
img = JSON.parse(img); | |
return img.urls.small; |
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
"""********************************************************* | |
Service: Generate csv from json request | |
------- Use example --------------- | |
from helpers.request import Request | |
params = { | |
'page':1, | |
'size':100, | |
'month':12, | |
'year':2021 | |
} |
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 readXlsxFile = require('read-excel-file/node'); | |
const MAIL = require('./mail'); | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
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
"""********************************************************* | |
-------------- Use example --------------- | |
from helpers.notifier import Notification | |
Notification.mail('Python notification message',['[email protected]', '[email protected]']) | |
# Notification.mail('Python notification message','[email protected],[email protected]') | |
**********************************************************""" | |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText |
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 express = require('express'); | |
const app = express(); | |
const port = 8844; | |
const fs = require('fs').promises; | |
const getFiles = (path) => { | |
return fs.readdir(path); | |
} | |
const generateRoom = async (path, file) => { |
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
//decoder | |
function buf2hex(buffer) { // buffer is an ArrayBuffer | |
return [...new Uint8Array(buffer)] | |
.map(x => x.toString(16).padStart(2, '0')) | |
.join(''); | |
} | |
let payload = 'YGUAALI='; | |
// let decoded = Buffer.from(payload, 'base64'); |
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 cors = fn => async (req, res) => { | |
res.setHeader('Access-Control-Allow-Credentials', true) | |
res.setHeader('Access-Control-Allow-Origin', '*') | |
// another common pattern | |
// res.setHeader('Access-Control-Allow-Origin', req.headers.origin); | |
// res.setHeader('Access-Control-Allow-Methods', 'GET,OPTIONS,PATCH,DELETE,POST,PUT') | |
res.setHeader('Access-Control-Allow-Methods', 'GET,OPTIONS') | |
res.setHeader( | |
'Access-Control-Allow-Headers', | |
'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version' |
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 request = require('request'); | |
var order = { | |
"foo":"bar" | |
} | |
order = JSON.stringify(order); | |
var xml = `<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:api="https://diegocornejo.com/"> | |
<soap:Header/> | |
<soap:Body> | |
<api:sendOrder> |
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
Download Image | |
docker pull store/oracle/weblogic:12.2.1.3-dev-190111 | |
or | |
docker pull store/oracle/weblogic:12.2.1.4-dev-200117 | |
Create properties file | |
touch domain.properties | |
The format of the domain.properties file is key value pair: | |
username=weblogic |