Skip to content

Instantly share code, notes, and snippets.

View neverendingqs's full-sized avatar

Mark Tse neverendingqs

View GitHub Profile
@neverendingqs
neverendingqs / Microsoft Sculpt Mobile Keyboard Remap
Last active July 9, 2022 01:09 — forked from tehshane/Microsoft Sculpt Mobile Keyboard Remap
AutoHotKey script that remaps the F1-F12 function keys on the Microsoft Sculpt Mobile keyboard to be pressed without having to use the Fn key. Disables some of the Windows 8 shortcuts, but leaves media keys intact.
; http://superuser.com/a/784683/502760
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#InstallKeybdHook
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; OPTIONAL: For those who use Home/End more than PgUp/PgDown, this flips their use with the Fn key.
; If you want the buttons to function as they are, add a semicolon (;) to the beginning of each line below.
; Home::PgUp
@neverendingqs
neverendingqs / README.md
Last active December 13, 2020 21:26
Chess Endgames

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

[user]
name = firstName lastName
email = email
[core]
preloadindex = true
fscache = true
autocrlf = false
safecrlf = false
symlinks = true
commitGraph = true
@neverendingqs
neverendingqs / circleci-gh-actions.md
Last active September 5, 2020 17:17
CircleCI vs. GitHub Actions

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!
@neverendingqs
neverendingqs / lambda.md
Last active March 26, 2020 19:42
AWS Notes
@neverendingqs
neverendingqs / query.sql
Last active February 3, 2020 21:53
Lucidchart MySQL ERD Import Query
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,
$ git grep --break -p authCodeScope
src/lib/utility.js=module.exports = {
src/lib/utility.js: authCodeScope: process.env.DEFAULT_AUTH_CODE_SCOPE,
src/lib/views.js=var index = function(req, cookie, error) {
src/lib/views.js: authCodeScope: cookie.authCodeScope,
src/server.js=app.post('/auth', function(req, res) {
src/server.js: cookie.authCodeScope = req.body.scope;
@neverendingqs
neverendingqs / final.js
Last active August 18, 2018 01:32
2017/03/13/ensure-all-nock-interceptors-are-used.html - 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 August 18, 2018 01:29
2017/03/13/ensure-all-nock-interceptors-are-used.html - 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 August 18, 2018 01:27
2017/03/13/ensure-all-nock-interceptors-are-used.html - 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() {