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
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: my-app-pv-volume | |
namespace: my-namespace | |
spec: | |
storageClassName: manual | |
capacity: | |
storage: 1Gi | |
accessModes: |
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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: my-app-sa | |
namespace: my-namespace | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: |
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 golang:alpine | |
WORKDIR /go/src/app | |
COPY . . | |
RUN go mod download -x | |
RUN go get github.com/githubnemo/CompileDaemon | |
ENTRYPOINT CompileDaemon --build="go build -o tmp/main" --command="./tmp/main" |
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
{ | |
"Nuxt Class Component": { | |
"prefix": "vue-component-class-ts", | |
"body": [ | |
"<template>", | |
" <div></div>", | |
"</template>", | |
"", | |
"<script lang=\"ts\">", | |
"import { Component, Vue } from 'vue-property-decorator'", |
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
DELETE FROM user_devices WHERE ctid IN ( | |
SELECT ctid FROM ( | |
SELECT ctid, ROW_NUMBER() OVER (PARTITION BY device_id ORDER BY id DESC) AS rn | |
FROM user_devices | |
) t | |
WHERE rn > 1) |
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
name: Netlify Builds | |
on: | |
schedule: | |
- cron: "00 22 */3 * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
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
[build] | |
command = "npm install && npm run collect:data" | |
functions = "./functions" | |
[dev] | |
functions = "./functions" |
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 strict'; | |
const express = require('express'); | |
const serverless = require('serverless-http'); | |
const bodyParser = require('body-parser'); | |
const request = require("request-promise"); | |
const app = express(); | |
const router = express.Router(); | |
router.get('/', async (req, res) => { |
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 fs = require("fs"); | |
const bmkg_data = require("./bmkg_data"); | |
const xml = require("xml2js"); | |
const request = require("request"); | |
const async = require("async"); | |
const path = require('path'); | |
let dataArray = []; | |
console.log('getting weather data...'); |
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
type UpdateTuple = [primary, value_a, value_b]; | |
async updateMultiple(data: UpdateTuple[]) { | |
return this.manager.transaction(async (transactionalManager) => { | |
if (data.length === 0) { | |
throw 'data cannot be empty'; | |
} | |
// generate parameter index for pgsql query | |
const paramsIndex = data.map((v, i) => { |
NewerOlder