Skip to content

Instantly share code, notes, and snippets.

Avatar
🌷
mgmg

DNEK dnek

🌷
mgmg
View GitHub Profile
@dnek
dnek / fireFunc.js
Created Dec 6, 2019
Nuxt x Firebase Cloud Functions
View fireFunc.js
import firebase from 'firebase/app'
export default async (ctx, inject) => {
const options = {
'functionsLocation': 'asia-northeast1',
'config': {
'apiKey': 'xxxx',
'authDomain': 'xxxx',
'databaseURL': 'xxxx',
'projectId': 'xxxx',
@dnek
dnek / index.js
Created Dec 6, 2019
Firebase Cloud Functions x ElasticSearch
View index.js
const functions = require('firebase-functions')
const { Client } = require('@elastic/elasticsearch')
const config = {
cloud: {
id: 'xxx'
},
auth: {
username: 'xxx',
password: 'xxx'
}
@dnek
dnek / random-search.js
Created Dec 6, 2019
ElasticSearch random search
View random-search.js
const result = await client.search({
index: 'xxx',
body: {
query: {
function_score: {
random_score: {}
}
},
size: 5
}
@dnek
dnek / eec6.piet-91-correct.gif.invalid
Last active May 6, 2020
eec6.piet-91-correct.gif
View eec6.piet-91-correct.gif.invalid
GIF87a � �����������������, p�C�(��E$ a