Skip to content

Instantly share code, notes, and snippets.

View fasterthanlime's full-sized avatar
🌃
4 oreos from heaven

Amos Wenger fasterthanlime

🌃
4 oreos from heaven
View GitHub Profile

So I'm storing data in SQLite now, which means I need to make sure I know what I send to the database.

Which is why I define objects that look like this:

const GamePasswordModel = {
  tableName: "gamePasswords",
  primaryKey: "id",
 columns: {

9.2.6 (2017-06-16)

  • Fix the last coverage in trace log should be extracted. !11128 (dosuken123)
  • Respect merge, instead of push, permissions for protected actions. !11648
  • Fix pipeline_schedules pages throwing error 500. !11706 (dosuken123)
  • Make backup task to continue on corrupt repositories. !11962
  • Fix incorrect ETag cache key when relative instance URL is used. !11964
  • Fix math rendering on blob pages.
  • Invalidate cache for issue and MR counters more granularly.
  • Fix terminals support for Kubernetes Service.

ideally

write tests first, code later (TDD, test-driven development).

this only works if you have perfect knowledge of the domain problem and/or have infinite time. I don't have either of these.

in reality

working off an existing codebase:

itch app tab fetching strategy:

  • grab what we can from local db (fast, doesn't usually fail)
    • emit that so it can be rendered already
  • fire API requests
    • there may be several (multiple pages of games, for example)
      • emit at each step so they can be rendered as soon as we got it
    • any API request might fail
      • because we're offline
  • because of server/proxy issues
const {Key, registry, windef} = require("windows-registry");
let key;
try {
const path = "SOFTWARE\\Wow6432Node\\Microsoft\\XNA\\Framework\\v4.0";
key = registry.openKeyFromPredefined(windef.HKEY.HKEY_LOCAL_MACHINE, path, windef.KEY_ACCESS.KEY_QUERY_VALUE);
const valBuf = registry.queryValueForKeyObject(key, "Refresh1Installed");
console.log("RefreshInstalled", valBuf.readInt32LE());
} finally {
if (key && key.handle) {
async function main () {
const noop = async () => null;
const cherrypie = async () => {
// throwing here is fine...
// the next line loses stack trace info. comment it out to see it working
await noop();
// throwing here is useless
throw new Error("in c");
}
C:\msys64\home\amwenger\Dev\itch\node_modules\debug\src\browser.js:123 electron-compile:require-hook Got HMR signal! +33s
C:\msys64\home\amwenger\Dev\itch\node_modules\debug\src\browser.js:123 electron-compile:require-hook Removing node module entry for C:\msys64\home\amwenger\Dev\itch\src\components\app.tsx +5ms
C:\msys64\home\amwenger\Dev\itch\node_modules\debug\src\browser.js:123 electron-compile:require-hook Removing node module entry for C:\msys64\home\amwenger\Dev\itch\src\store\chrome-store.ts +1ms
C:\msys64\home\amwenger\Dev\itch\node_modules\debug\src\browser.js:123 electron-compile:require-hook Removing node module entry for C:\msys64\home\amwenger\Dev\itch\src\reactors\route.ts +0ms
C:\msys64\home\amwenger\Dev\itch\node_modules\debug\src\browser.js:123 electron-compile:require-hook Removing node module entry for C:\msys64\home\amwenger\Dev\itch\src\logger\index.ts +0ms
C:\msys64\home\amwenger\Dev\itch\node_modules\debug\src\browser.js:123 electron-compile:require-hook Removing node module entry for
/*
* Copyright (c) 2003 Fabrice Bellard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*

Omar is looking for:

  • A tool that generates a zip containing files in "new" that aren't in "old"

(that would effectively act like a "patch" that doesn't delete removed files).

butler in a nutshell

Here's what butler does: