profile
viewpoint
Tim Georift Perth, Australia Software Engineer

liamjack/VirtualTrader 10

Virtual stock trading site. Users start off with 200 $ and trade virtual stocks at their real price, the aim of the game is to make the most money. Entirely rebuilt from scratch based on the original VirtualTrader, now in OOP.

Georift/iAuth 8

Open-Source HWID Licencing Software

Georift/angular-cesium 0

JavaScript library for creating map based web apps using Cesium and Angular

Georift/cli 0

The Sequelize CLI

Georift/couchdb-fauxton 0

Apache CouchDB

Georift/DefinitelyTyped 0

The repository for high quality TypeScript type definitions.

Georift/degit 0

Straightforward project scaffolding

push eventgregzaal/Texture-Haven

Greg Zaal

commit sha 316e53c563c49e21ee3e59f8ca8da3b1ba261840

Indent

view details

Greg Zaal

commit sha b74f540cacdbfdc3e14b4b468b8a8281163dd870

Shuffle privacy page, add adsense info

view details

push time in 3 hours

push eventgregzaal/Texture-Haven

Greg Zaal

commit sha 339cbd6fad7abdf9c2135856f602ea5752dc31d9

AdSense tag

view details

push time in 7 hours

startedmikf/gallery-dl

started time in 17 hours

startednix-community/home-manager

started time in 2 days

startedOWASP/CheatSheetSeries

started time in 6 days

issue commentpouchdb-community/pouchdb-authentication

PouchDb cookie does not auto-refresh after 10 minutes.

I wasn't sure if I should re-use the remote pouchDb instance, but I did a little experiment, where I only do db.login once, but create a brand new remote instance before I do a db.replicate.to. When I did this, the _session api was called every time with username and password. So it "worked", but made cookie auth besides-the-point, because it gets a new AuthSession cookie on every call.

willemodendaal

comment created time in 12 days

issue openedpouchdb-community/pouchdb-authentication

PouchDb cookie does not auto-refresh after 10 minutes.

I use db.login() to log the user in, do some operations (that work fine). Then I wait 10 minutes and try again with the same db instance, but then the calls fail with HTTP 401 Unauthorized.

I don't see any traffic in Chrome's "Network" tab to indicate that tokens were refreshed.

This is what my CouchDb ini file looks like (maybe I'm missing something here?)

[couchdb] 
single_node=true ; We set this, so that system dbs are created automatically.

[httpd]
enable_cors = true

[chttpd]
port = 31986

[cors]
; List of origins, separated by a comma (protocol, host, optional port)
; refer to http://tools.ietf.org/html/rfc6454 for specification
; //todo: these should differ based on environment. "localhost" is only for local dev.
credentials = true
origins = http://localhost:3000, https://localhost:31984

My javascript code that connects to the remote couchDb looks as follows. configureRemoteCouch and loginToRemoteCouch is only called once by my code, and from there I use the same remoteCouch instance:

import PouchAuth from 'pouchdb-authentication';
PouchDB.plugin(PouchAuth);

let remoteCouch = null;
function configureRemoteCouch(dbName) {
    console.log('Configuring remote couchDb connection...');
    remoteCouch = new PouchDB(
        `http://localhost:31986/${dbName}`,
        {
            skip_setup: true
        });
}

function loginToRemoteCouch(userName, password) {
    console.log('Login local user to remote couchDb family db...';
    remoteCouch.logIn(userName, password, function (err, response) {
        if (err) {
            console.error(err);
        }
        else {

            // All good, do nothing.
        }
    });
}

The javascript code that pushes documents to the local pouchDb and then replicates to the remote looks like this:

    const createDbDocument = async () => {
        if (!familyDbCreated) return;

        console.log('Save document to local pouchDb...');
        const localPouchDb = new PouchDB(state.familyDbName);
        await localPouchDb.post({   // Some random document.
            timestamp: new Date()
        });

        console.log('Start replication...');
        localPouchDb.replicate.to(remoteCouch); 
        localPouchDb.replicate.from(remoteCouch);
        console.log('Replicated.');
    }

Expected Behavior

I'd expect all calls to succeed. The first calls, done immediately after logging in, as well as additional calls after 10 minutes of inactivity.

Current Behavior

Calls made after 10 minutes fail with HTTP 401.

Request URL: http://localhost:31986/familydb2020o11o18t13o14o55o226z/_local/gg95SIxnSDNYZ7a5zCoYPA%3D%3D?
Request Method: GET
Status Code: 401 Unauthorized
Remote Address: [::1]:31986
Referrer Policy: strict-origin-when-cross-origin

Request headers:
GET /familydb2020o11o18t13o14o55o226z/_local/gg95SIxnSDNYZ7a5zCoYPA%3D%3D HTTP/1.1
Host: localhost:31986
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
sec-ch-ua: "Chromium";v="86", "\"Not\\A;Brand";v="99", "Google Chrome";v="86"
accept: application/json
DNT: 1
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
content-type: application/json
Origin: http://localhost:3000
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://localhost:3000/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8,af;q=0.7

Response headers:
HTTP/1.1 401 Unauthorized
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:3000
Access-Control-Expose-Headers: content-type, cache-control, accept-ranges, etag, server, x-couch-request-id, x-couch-update-newrev, x-couchdb-body-time
Cache-Control: must-revalidate
Content-Length: 78
Content-Type: application/json
Date: Wed, 18 Nov 2020 13:28:15 GMT
Server: CouchDB/3.1.1 (Erlang OTP/20)
X-Couch-Request-ID: dd77fc67a4
X-CouchDB-Body-Time: 0

Your Environment

  • Version of PouchDB Authentication: 1.1.3
  • Version of PouchDB: 7.2.2
  • Platform name and version: Chrome Version 86.0.4240.198 (Official Build) (64-bit)
  • Operating System and version: Windows 10 Pro
  • Server: CouchDB running in a docker container.

created time in 12 days

startedaws/jsii

started time in 13 days

startedc9fe/22120

started time in 18 days

startedturnerhayes/xpuz

started time in 21 days

push eventfoambubble/foam

Riccardo Ferretti

commit sha 2330eec2ea1c386a28ab08532db16789fbeaf0fc

sorting tags alphabetically

view details

push time in 25 days

push eventfoambubble/foam

Riccardo Ferretti

commit sha 7f02caa1e032fd8e7f6a6f7027f85fb51a1d185c

modularized utils functions

view details

Riccardo Ferretti

commit sha 9162b8ba3dd41fba655be35e210cc672a9027df3

fixed error in test and added new tests

view details

Riccardo Ferretti

commit sha 94db96c69ea96595e29e4c840dcec52a9a11033a

added dependency to matchAll backfill

view details

push time in 25 days

issue commentfoambubble/foam

Document publishing foam-vscode

More notes: yarn lerna publish preminor

  • update CHANGELOG.MD file

  • yarn lerna publish preminor

from package/foam-vscode yarn package-extension

  • do local testing

    • linkdef generation
    • navigation
    • graph
    • snippets
  • fix bugs if necessary (and CHANGELOG)

  • yarn lerna publish minor

  • republish from package/foam-vscode yarn package-extension

  • might wanna test it again based on bug fixes

  • publish the extension npx vsce publish --packagePath foam-vscode-XXX

  • update the release notes

    • in GitHub, top right, click on releases
    • select "tags" in top left
    • pick last released tag, add release information from changelog
    • publish (no need to attach artifacts)
  • announce on discord

TODO

  • check whether we need the pre<version> publish step, or if we can build the extension from the monorepo (once https://github.com/microsoft/vscode-vsce/pull/493 is merged)
    • to test if it works, just bump the version locally, then run the "yarn package extension" command --> if it works the issue if fixed, if it doesn't it's trying to get the package from 5pm
  • replace in package-extension the use of npx with yarn
  • write doc about release process
  • create proper test script
jsjoeio

comment created time in a month

issue commentfoambubble/foam

Document publishing foam-vscode

I can help with this if you want @riccardoferretti - feel free to assign to me after sharing your notes!

jsjoeio

comment created time in a month

pull request commentpmmmwh/react-refresh-webpack-plugin

fix: adds resourceQuery to getSocketUrlParts to setup the socket

🙌 great! pPleasure working with you! Hope to see this merged soon

frehner

comment created time in a month

pull request commentpmmmwh/react-refresh-webpack-plugin

fix: adds resourceQuery to getSocketUrlParts to setup the socket

@frehner I submitted a PR to your repo frehner#1

I just need to check it one more time before I wanted to message you about it. Sorry, I didn’t have much time to work on it

my fault - I totally missed that you had opened a PR for it.

but in any case, I just merged in the additional work that you added. it's looking good! thanks for all your work

frehner

comment created time in a month

pull request commentpmmmwh/react-refresh-webpack-plugin

fix: adds resourceQuery to getSocketUrlParts to setup the socket

@frehner I submitted a PR to your repo https://github.com/frehner/react-refresh-webpack-plugin/pull/1

I just need to check it one more time before I wanted to message you about it

frehner

comment created time in a month

pull request commentpmmmwh/react-refresh-webpack-plugin

fix: adds resourceQuery to getSocketUrlParts to setup the socket

@patrikholcak I updated the code and added you as a co-author to the commit to give you credit for the work - let me know if that's ok.

@pmmmwh I've incorporated the feedback and this code looks like it fixes the issue with my setup, so I'm going to remove the "In Progress" status from this PR in hopes that we're close 🙂

frehner

comment created time in a month

issue commentpmmmwh/react-refresh-webpack-plugin

IE11 url polyfilling doesn't help because new URL() is referenced in injected helpers

Perhaps some sort of configuration option to exclude a particular entry from processing altogether?

wh1t3cAt1k

comment created time in a month

issue openedpmmmwh/react-refresh-webpack-plugin

IE11 url polyfilling doesn't help

I am using this plugin to support fast refresh in an IE11 environment, in conjunction with webpack@5 and webpack serve (ex. webpack-dev-server).

I took all precaution to inject all the necessary polyfills by having a polyfill chunk in my <head>, which includes the polyfill for url.

That's the source code of the chunk, it is of course compiled to ES5 by Babel.

// IE11 - One Love 💕
// -
import 'core-js/stable'; // URL polyfill is included here, but `url-polyfill` does not work either.
import 'regenerator-runtime/runtime';

It resides in a chunk called evil-decrepit-browsers-polyfill which, as I mentioned, is the first chunk injected into my index.html - nothing ever gets before it.

The problem is that dev server in the hot mode (I use a combination of inline and hot) injects react-refresh runtime and helpers even to this chunk!

(function(module, __unused_webpack_exports, webpack_require) {

/* provided dependency */ var __react_refresh_utils__ = __webpack_require__(/*! ../../node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js */ "../../node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js");

/* provided dependency */ var __react_refresh_error_overlay__ = __webpack_require__(/*! ../../node_modules/@pmmmwh/react-refresh-webpack-plugin/overlay/index.js */ "../../node_modules/@pmmmwh/react-refresh-webpack-plugin/overlay/index.js");

__webpack_require__.$Refresh$.runtime = __webpack_require__(/*! ../../node_modules/react-refresh/runtime.js */ "../../node_modules/react-refresh/runtime.js");
__webpack_require__.$Refresh$.setup(module.id);

// my URI polyfilling is now below

And during the invocation of this injected code at the top I get an error in getSocketUrlParts(resourceQuery):

image

because I haven't had a chance to polyfill this yet.

Using the below configuration doesn't help

                  new ReactRefreshWebpackPlugin({
                      exclude: /(node_modules|evil-decrepit-browsers-polyfill)/,
                  }),

This is a vicious cycle, the helpers seem to be injected into every file and I can't polyfill before the injected code executes.

Any thoughts?

created time in a month

issue commentfoambubble/foam

["BUG"] Foam: Show graph' fails with "All collection items must start at the same column"

@fmagin sounds like there is a syntax problem in your YAML metadata. I agree that shouldn't cause the whole thing to break, we need to push some error handling in the document parsing.

fmagin

comment created time in a month

issue commentfoambubble/foam

["BUG"] Wiklinks not being generated with v0.4 "command 'foam-vscode.update-wikilinks' not found"

The error message seems to disappear if I strip all frontmatter metadata like in #301 but the links still aren't generated

fmagin

comment created time in a month

issue commentfoambubble/foam

["BUG"] Foam: Show graph' fails with "All collection items must start at the same column"

Running the command from the other issue and restarting does seem to fix it. Still I consider this a bug, because this forces me to conform to some unknown frontmatter spec (which I'd like to use for other purposes or extensions).

fmagin

comment created time in a month

issue openedfoambubble/foam

["BUG"]

Describe the bug

The new graph does not work or it is unclear what is required to make it work.

Affected package <!-- Its ok if you don't know! -->

  • [ ] foam-cli
  • [ ] foam-core
  • [ ] foam-vscode
  • [ ] other/meta/???

To Reproduce Upgrade to v0.4

Run command Foam: Show Graph

Command 'Foam: Show graph' resulted in an error (All collection items must start at the same column)

Expected behavior Whatever that command is actually supposed to do.

Additional context https://github.com/foambubble/foam/issues/301 brings up yaml (i.e. frontmatter) as a possible cause for a different error. I also have that in some files and might investigate this. Still I do not think that this feature should break simply because I am using YAML, without ever being told how YAML interacts with it.

created time in a month

issue openedfoambubble/foam

["BUG"] Wiklinks not being generated with v0.4 "command 'foam-vscode.update-wikilinks' not found"

Describe the bug

No wikilinks are being generated on file save.

Specifically, when manually running the command Foam: Update Markdown Reference List I get the error message:

Command 'Foam: Update Markdown Reference List' resulted in an error (command 'foam-vscode.update-wikilinks' not found)

Affected package <!-- Its ok if you don't know! -->

  • [ ] foam-cli
  • [ ] foam-core
  • [ ] foam-vscode
  • [ ] other/meta/???

To Reproduce

Not fully clear, but I can reproduce this on two different installs and was most likely caused by the update to the v0.4 version

Expected behavior Generate the links like it used to happen

created time in a month

issue commentfoambubble/foam

Document publishing foam-vscode

hi @jsjoeio - you are totally right, I have more notes from the handover with @jevakallio - will write them down in the foam doc. I would also like to automate most of the flow (there is a testing step, which will need to be manual until we add more e2e tests), any guide/contribution/suggestion very much appreciated (somewhat related to #315)

jsjoeio

comment created time in a month

issue openedfoambubble/foam

Automate adding contributors via GitHub Action

It would be great if we had a GitHub Action which ran on "merge pull request" and then opened a new pull request to add a person to the all-contributors table in the README. It wouldn't solve all the use cases for adding contributors to the table, but a majority of them.

Could be a good first issue.

created time in a month

issue openedfoambubble/foam

Document publishing foam-vscode

This message is copied from a private channel in Discord (if you have access, you can view here).

As for publishing, you can use lerna to publish all packages in lockstep.

First bump the package version by running this in the monorepo root:

yarn lerna version <major|minor|patch>

That will bump the version numbers of all packages, and their internal references, so for example foam-vscode will point to the new version of foam-core etc.

It will also push a tag to github. If you want to dry run this locally without pushing, you can run

yarn lerna version minor --no-git-tag-version --no-push

When you're ready to publish, you can do:

yarn lerna publish

Once the npm packages are published, you can package up the vscode extension with the following command in the foam-vscode directory: yarn package-extension

The vsce tool does not understand yarn monorepos, so what this will do is use npm to install the package, which requires the foam-core dependency to have already been published to npm. I know this is ass backwards, since if you discover that something is wrong in the packaged extension, you'll need to fix whatever issue there is and then republish the packages to npm, which will again bump the version number and cause potentially dead versions in the registry. If you want to avoid that, you can first create an alpha version with creating a prerelease version, e.g. 0.4.1-alpha.0, with:

yarn lerna publish <premajor|preminor|prepatch|prerelease>

Anyway, once you've gotten a nicely packaged vsix file, you can install and test it locally:

code --install-extension foam-vscode-0.4.1.vsix

If everything is fine, you can then publish the vsix file to marketplace:

vsce publish --packagePath foam-vscode-0.4.1.vsix

That should probably be documented, and the process could be improved, but that's what it is now :man_shrugging:

Two things I wanted to note here:

  1. Ideally, it would be nice to auto-publish via a GitHub action
  2. Publishing the extension should be documented somewhere for contributors

created time in a month

issue commentpmmmwh/react-refresh-webpack-plugin

type-fest peer dependency warning

this is s also breaking regular install on npm 7.0.4

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: type-fest@0.18.0 npm ERR! node_modules/type-fest npm ERR! dev type-fest@"0.18.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peerOptional type-fest@"^0.13.1" from @pmmmwh/react-refresh-webpack-plugin@0.4.3 npm ERR! node_modules/@pmmmwh/react-refresh-webpack-plugin npm ERR! dev @pmmmwh/react-refresh-webpack-plugin@"0.4.3" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR!

streetcleaner

comment created time in a month

more