Append this to your ~/.zshrc file.
function preexec() {
timer=$(($(date +%s%0N)/1000000))| import { Test, TestingModule } from '@nestjs/testing' | |
| import { INestApplication, LoggerService } from '@nestjs/common' | |
| import * as request from 'supertest' | |
| import { AppModule } from './../src/app.module' | |
| class TestLogger implements LoggerService { | |
| log(message: string) {} | |
| error(message: string, trace: string) {} | |
| warn(message: string) {} | |
| debug(message: string) {} |
| const AWS = require('aws-sdk') | |
| const Crypto = require('crypto') | |
| AWS.config.region = 'us-east-1' | |
| var kms = new AWS.KMS() | |
| keyArn = 'Put AWS KMS Key ARN Here' | |
| // Set the KeyPairSpec to the type of key you want to generate. |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | |
| https://mirror1.malwaredomains.com/files/justdomains | |
| http://sysctl.org/cameleon/hosts | |
| https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist | |
| https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt | |
| https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt | |
| https://hosts-file.net/ad_servers.txt |
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
| After install zsh | |
| - brew update | |
| - brew install nvm | |
| - mkdir ~/.nvm | |
| after in your ~/.zshrc or in .bash_profile if your use bash shell: | |
| export NVM_DIR=~/.nvm | |
| source $(brew --prefix nvm)/nvm.sh |
| kind: Deployment | |
| ... | |
| spec: | |
| template: | |
| spec: | |
| #secrets and config | |
| volumes: | |
| ... | |
| - name: sftp-host-keys | |
| secret: |
| const request = require('request-promise-native') | |
| const fs = require('fs') | |
| const util = require('util') | |
| const log_file = fs.createWriteStream(__dirname + '/kubernetes-client-functions.md', { flags: 'w' }) | |
| log = function (d) { | |
| // | |
| log_file.write(util.format(d) + '\n') | |
| } |
| const { spawn } = require('child_process') | |
| const waitOn = require('wait-on') | |
| let subProcess | |
| exports.config = { | |
| tests: './test/tests/*_test.js', | |
| output: './output', | |
| helpers: { | |
| Puppeteer: { | |
| url: 'http://localhost:8080', |