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

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:

@fasterthanlime
fasterthanlime / 001_concurrent_writes.go
Last active December 31, 2016 15:26
TIL: it's possible to open the same path twice (even on Windows!) - it might not be a good idea, though.
package main
import (
"io/ioutil"
"log"
"os"
)
func main() {
path := "sample.txt"
@import 'https://fonts.googleapis.com/css?family=Roboto';
#inner_column
{
width: 1920px;
}
.view_game_page .user_formatted iframe
{
dpkg --add-architecture i386
apt-get update
apt-get install libasound2-dev:i386 libpulse-dev:i386 libgl1-mesa-dev:i386 libwayland-dev:i386 libopenal-dev:i386 libmpg123-dev:i386 libvorbis-dev:i386 libtheora-dev:i386 libfreetype6-dev:i386