Skip to content

Instantly share code, notes, and snippets.

View another-guy's full-sized avatar
💻
01001000 01000101 01001100 01001100 01001111

Igor Soloydenko another-guy

💻
01001000 01000101 01001100 01001100 01001111
View GitHub Profile
@another-guy
another-guy / vscode.e2e.jest.config.js
Last active March 4, 2019 09:20
VS Code E2E Jest Config
module.exports = {
moduleFileExtensions: ['js'],
testMatch: ['<rootDir>/out/test/**/*.test.js'],
verbose: true,
};
@another-guy
another-guy / npm-install-jest-cli
Last active March 4, 2019 09:10
NPM install Jest CLI
npm install --save-dev @types/jest-cli jest-cli
@another-guy
another-guy / jest-test-runner-pseudocode.ts
Created March 4, 2019 08:47
Jest test runner (pseudocode)
const jestTestRunnerForVSCodeE2E: ITestRunner = {
run(testsRoot: string, clb: (error: Error, failures?: number) => void): void {
try {
const result = runJestTests(configuration);
if (result.executionError) {
clb(result.executionError);
} else {
clb(undefined, result.numberOfFailedTests);
}
} catch (e) {
@another-guy
another-guy / declarations.d.ts
Created March 4, 2019 08:31
ITestRunner's interface definition
interface ITestRunner {
run(testsRoot: string, clb: (error: Error, failures?: number) => void): void;
}
@another-guy
another-guy / yo-code.sh
Last active March 4, 2019 07:50
Scaffolding VS Code extension project via Yeoman
# Install Yeoman and VS Code extension generator
npm install -g yo generator-code
# Generate VS Code extension project
yo code

$ which lerna /c/Program Files/nodejs/lerna

$ lerna --version 3.9.0

$ lerna bootstrap lerna notice cli v3.9.0 lerna info Bootstrapping 3 packages lerna info Symlinking packages and binaries

export class Mammal {
mammalName: string;
}
export class Dog extends Mammal {
dogName: string;
}
export class Cat extends Mammal {
catName: string;
}
@another-guy
another-guy / iso8601dateStringAdapter.ts
Created September 12, 2017 19:04
ISO8601 string based Date Adapter for angular material
import { DateAdapter } from '@angular/material';
import {
addDays,
addMonths,
compareAsc,
format,
getDate,
getDay,
getDaysInMonth,
getMonth,
@another-guy
another-guy / https-server-bin-www.js
Created July 28, 2017 03:15 — forked from pineoc/https-server-bin-www.js
make https server using expressjs v4
#!/usr/bin/env node
/**
* Module dependencies.
*/
var app = require('../app');
var debug = require('debug')('logstash_test:server');
var http = require('http');
@another-guy
another-guy / install-comodo-ssl-cert-for-nginx.rst
Created July 27, 2017 01:14 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert