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
| import {WorkerHost} from '@nestjs/bullmq'; | |
| import {Job} from 'bullmq'; | |
| export class BatchWorkerHost extends WorkerHost { | |
| private jobBatchCreationTime: Date; | |
| private jobBatch: Job[]; | |
| private jobBatchProcessPromise: Promise<void>; | |
| private running: boolean = false; | |
| private resolveJobBatchProcessPromise: () => void; |
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 generateTCKN() { | |
| function randomNumber(min, max) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| } | |
| var digits = []; | |
| var TCKN = ""; | |
| digits[0] = randomNumber(1, 9); | |
| for (var i = 1; i < 9; i++) { |
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
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=33 # <-- wordpress owner | |
| WP_GROUP=33 # <-- wordpress group | |
| WP_ROOT=/var/www/html/blog # <-- wordpress root directory |