Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Tse neverendingqs

View GitHub Profile
@neverendingqs
neverendingqs / README.md
Last active Dec 13, 2020
Chess Endgames
View README.md

Usage

chess.com

  • Go to https://www.chess.com/analysis
  • Paste the position under Load FEN
  • At the bottom right, click on Finish vs. Computer
    • Note: computer level is automatically maxed out

lichess

@neverendingqs
neverendingqs / circleci-gh-actions.md
Last active Sep 5, 2020
CircleCI vs. GitHub Actions
View circleci-gh-actions.md

CircleCI vs. GitHub Actions

CircleCI

  • Orbs / commands / jobs allow for DRY in the same YAML file
    • The new and better job workflow dependency graph is great!
    • I have never tried YAML anchors with GitHub Actions, but they help out in CircleCI
  • "Retry from failed" was a really nice addition as well
  • Contexts are amazing!
View lambda.md
@neverendingqs
neverendingqs / query.sql
Last active Feb 3, 2020
Lucidchart MySQL ERD Import Query
View query.sql
SELECT
'mysql' dbms,
t.TABLE_SCHEMA,
t.TABLE_NAME,
c.COLUMN_NAME,
c.ORDINAL_POSITION,
c.DATA_TYPE,
c.CHARACTER_MAXIMUM_LENGTH,
-- Add this
c.IS_NULLABLE,
@neverendingqs
neverendingqs / final.js
Last active Aug 18, 2018
2017/03/13/ensure-all-nock-interceptors-are-used.html - final.js
View final.js
'use strict';
const assert = require('chai').assert;
const nock = require('nock');
const request = require('supertest');
const uniqueValue = 'da64daaf-182b-4af6-a4af-09727bf8d5aa';
const app = require('../../src/server');
describe('server', function() {
afterEach(function() {
@neverendingqs
neverendingqs / testfix.js
Created Aug 18, 2018
2017/03/13/ensure-all-nock-interceptors-are-used.html - testfix.js
View testfix.js
return Promise.all(
Array(5).fill(0).map(i =>
request(app)
.get('/')
.then(res => assert.equal(res.text, uniqueValue));
)
);
@neverendingqs
neverendingqs / updatedtest.js
Created Aug 18, 2018
2017/03/13/ensure-all-nock-interceptors-are-used.html - updatedtest.js
View updatedtest.js
'use strict';
const assert = require('chai').assert;
const nock = require('nock');
const request = require('supertest');
const uniqueValue = 'da64daaf-182b-4af6-a4af-09727bf8d5aa';
const app = require('../../src/server');
describe('server', function() {
it('GET / once', function() {
@neverendingqs
neverendingqs / updatedserver.js
Created Aug 18, 2018
2017/03/13/ensure-all-nock-interceptors-are-used.html - updatedserver.js
View updatedserver.js
'use strict';
const request = require('superagent');
const express = require('express');
const app = express();
app.get('/', function(req, res) {
request
.get('https://www.example.com')
.then(response => res.send(response.text))
@neverendingqs
neverendingqs / fiveinterceptors.js
Created Aug 18, 2018
2017/03/13/ensure-all-nock-interceptors-are-used.html - fiveinterceptors.js
View fiveinterceptors.js
'use strict';
const assert = require('chai').assert;
const nock = require('nock');
const request = require('supertest');
const uniqueValue = 'da64daaf-182b-4af6-a4af-09727bf8d5aa';
const app = require('../../src/server');
describe('server', function() {
it('GET / once', function() {
@neverendingqs
neverendingqs / simple-example-nock.js
Created Aug 17, 2018
2017/03/13/ensure-all-nock-interceptors-are-used.html - simple-example-nock.js
View simple-example-nock.js
'use strict';
const assert = require('chai').assert;
const nock = require('nock');
const request = require('supertest');
const uniqueValue = 'da64daaf-182b-4af6-a4af-09727bf8d5aa';
const app = require('../../src/server');
describe('server', function() {
it('GET / once', function() {