This file contains hidden or 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
| # delta_nom.rb | |
| require 'sqlite3' | |
| class Measurement | |
| def initialize(project) | |
| @db_path = "dch-jcodeodor/#{project}/sqlite-jcodeodor/database" | |
| end | |
| # db_sqlite berisi (before || after) | |
| def get_nom(db_sqlite) |
This file contains hidden or 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
| function getProducts(url){ | |
| const promise = new Promise((resolve,reject) => { | |
| const data = getData(url); | |
| if(data.isExist()){ | |
| resolve(data.to_json()); | |
| }else{ | |
| reject("error"); | |
| } | |
| }) |
This file contains hidden or 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
| stages: | |
| - publish | |
| - deploy | |
| variables: | |
| TAG_LATEST: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME:latest | |
| TAG_COMMIT: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA | |
| DOCKER_HOST: tcp://docker:2375 | |
| DOCKER_TLS_CERTDIR: "" | |
| DOCKER_DRIVER: overlay2 |
This file contains hidden or 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
| Here's an example of a Node.js script that sets a reminder for a certain date using the node-cron package: | |
| // particular date | |
| const cron = require('node-cron'); | |
| const reminderDate = new Date("2022-12-31 23:59:00"); | |
| const schedule = cron.schedule(reminderDate, () => { | |
| console.log("Reminder: Do something!"); |
This file contains hidden or 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
| pipeline { | |
| agent any | |
| parameters { | |
| booleanParam description: 'Is this a production deployment?', name: 'DEPLOY_PROD_PORTAL' | |
| } | |
| environment { | |
| SSH_HOST = '10.2.xx.yyy' | |
| SSH_USER = 'yaadmin' |
This file contains hidden or 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 Lab = require("@hapi/lab"); | |
| const { expect } = require("chai"); | |
| const sinon = require("sinon"); | |
| const nodemailer = require("nodemailer"); | |
| const { PASS_MAIL, USER_MAIL } = process.env; | |
| const { init } = require("../server_test"); | |
| const { | |
| describe, it, beforeEach, afterEach, |
OlderNewer