profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/blaenk/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

blaenk/dots 51

my dot files

blaenk/blaenk.github.io 45

the source for my personal site, written in Haskell, powered by Hakyll

blaenk/difm 3

The DI.FM iPhone Streaming App

blaenk/carson 1

lightweight, "real-time" web interface for rtorrent

blaenk/anymap 0

A safe and convenient store for one value of each type

blaenk/asm 0

Code for a college assembly language course

blaenk/aura 0

A secure, multilingual package manager for Arch Linux and the AUR.

push eventblaenk/site

Jorge Israel Peña

commit sha fbfd85a3e2519a7d86496928aaf8830af0998b79

Fix union-find code

view details

push time in 9 days

issue openedgrubersjoe/react-activity-calendar

Cannot read property 'x' of undefined

Sorry I don't mean to overwhelm you! Just excited to try this out, it looks great. None of these issues are urgent, no pressure at all! Just thought you might want some feedback.

I've noticed that sometimes when I supply data I get an error in getMonthLabels when indexing labels[1].x:

Uncaught TypeError: Cannot read property 'x' of undefined
    at eval (index.es.js:89)
    at Array.filter (<anonymous>)
    at getMonthLabels (index.es.js:89)
    at renderLabels (index.es.js:212)
    at ActivityCalendar (index.es.js:322)
    at renderWithHooks (react-dom.development.js:14985)
    at mountIndeterminateComponent (react-dom.development.js:17811)
    at beginWork (react-dom.development.js:19049)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)

Sample data:

[{"date":"2021-07-04","count":0,"level":0},{"date":"2021-07-05","count":0,"level":0},{"date":"2021-07-06","count":0,"level":0},{"date":"2021-07-07","count":0,"level":0},{"date":"2021-07-08","count":0,"level":0},{"date":"2021-07-09","count":0,"level":0},{"date":"2021-07-10","count":0,"level":0},{"date":"2021-07-11","count":0,"level":0},{"date":"2021-07-12","count":0,"level":0},{"date":"2021-07-13","count":0,"level":0},{"date":"2021-07-14","count":0,"level":0},{"date":"2021-07-15","count":0,"level":0},{"date":"2021-07-16","count":0,"level":0},{"date":"2021-07-17","count":0,"level":0}]

created time in 13 days

issue commentgrubersjoe/react-activity-calendar

End on current date

Otherwise/in addition it might be nice to be able to style the current date differently, maybe with an inward border or something, to easily find it.

blaenk

comment created time in 13 days

startedgrubersjoe/react-activity-calendar

started time in 13 days

issue openedgrubersjoe/react-activity-calendar

End on current date

Something possible on the github contribution heatmap as well as on https://github.com/kevinsqi/react-calendar-heatmap is the ability for the contribution heatmap to end on the current date, meaning the current date is the last item, and the rest of the left side of the heatmap conveys the entire past year.

Not sure if this is already possible by simply rotating the data array?

That might be nice to support!

created time in 13 days

issue openedgrubersjoe/react-activity-calendar

Fit to container width

Very beautiful component!

I'm trying to figure out how to get it to fit the width of the container I embed it in. It seems like the width is determined concretely in pixels based on the grid size etc.

Experimenting with dev tools it seems like I can delete the <article> width: 100px and the child <svg> width and height attributes, and that seems to fit it to the width just fine in a responsive manner, as I resize the page.

Not sure if I'm just not passing the right properties or if this is indeed something that would have to be added to the component.

Thank you for creating this!

created time in 13 days

issue commentgrubersjoe/react-github-calendar

Ability to reuse component for non-github use cases

Wow that's amazing! Thank you so much Jonathan!

blaenk

comment created time in 13 days

issue commentapollographql/apollo-cache-persist

LocalStorageWrapper broken on 0.10.0

cc @PMCorbett regarding what I think may be the relevant commit 8a1563401bab5ae854e7611c833ea64fff20a50d via https://github.com/apollographql/apollo-cache-persist/pull/420

No pressure, just adding information.

blaenk

comment created time in 13 days

push eventblaenk/site

Jorge Israel Peña

commit sha 82f82a370136d026688ddde97a76c48aa5c9d74f

Color headers brighter in dark mode

view details

push time in 14 days

issue commentapollographql/apollo-cache-persist

LocalStorageWrapper broken on 0.10.0

No rush at all! I simply stuck with the previous version for now, just thought I'd make you all aware of this.

Thank you and enjoy your holiday!

blaenk

comment created time in 15 days

issue openedapollographql/apollo-cache-persist

LocalStorageWrapper broken on 0.10.0

Using the same code from the example:

https://github.com/apollographql/apollo-cache-persist/blob/7bcb322a32aafb088afcf2c21c1ebe793409d8e3/examples/web/src/index.tsx#L76-L83

And from the readme, upgrading to 0.10.0 without any code changes breaks the use of LocalStorageWrapper:

TS2322: Type 'LocalStorageWrapper' is not assignable to type 'PersistentStorage<PersistedData<NormalizedCacheObject>>'.
Types of property 'setItem' are incompatible.
Type '(key: string, value: string) => void | Promise<void>' is not assignable to type '(key: string, value: PersistedData<NormalizedCacheObject>) => void | Promise<void> | PersistedData<NormalizedCacheObject> | Promise<...>'.
Types of parameters 'value' and 'value' are incompatible.
Type 'PersistedData<NormalizedCacheObject>' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.

The types don't seem to line up. I think the problem is that the type parameter for CachePersistor is in this case NormalizedCacheObject so the options are ApolloPersistOptions<NormalizedCacheObject> which would then expect storage: PersistentStorage<PersistedData<NormalizedCacheObject>>, whereas LocalStorageWrapper would provide PersistentStorage<string>.

By the way, it might be helpful to build the examples as part of CI to serve as a canary for when these things happen.

created time in 15 days

push eventblaenk/dots

Jorge Israel Peña

commit sha 52dc9f373614ab93e97a7267f5aa7d776d8cb008

zsh: klogs function for kubectl logs

view details

Jorge Israel Peña

commit sha 9127cc6443322b046e777df3fbe3ae7cf6b115a8

git: add git find-file

view details

Jorge Israel Peña

commit sha e9b5954d221738c8160b6c2fb2292828e7ac88bb

zsh: add poetry to path

view details

push time in a month

issue openedaws/aws-cdk

(aws-msk): Missing L2 Cluster construct in 2.0 RC

<!-- description of the bug: -->

I'm not sure if this is a bug or not, I'm not sure what the strategy is with version 2 RCs, maybe you're not merging in new features since the 2.0 RC came out?

Specifically, it seems that PR #9908 which added the MSK L2 construct for a Cluster and was released as part of 1.103.0 never got into the RC line, but maybe this is to be expected and many other changes aren't making it into 2 RC?

Reproduction Steps

<!-- minimal amount of code that causes the bug (if possible) or a reference.

The code sample should be an SSCCE. See http://sscce.org/ for details. In short, provide a code sample that we can copy/paste, run and reproduce. -->

$ curl -OJLR $(npm view aws-cdk-lib@2.0.0-rc.6 dist.tarball)
$ tar xvf aws-cdk-lib-2.0.0-rc.6.tgz
$ find package -path '*aws-msk*' -name '*cluster*'

# I think this is where it should be based on
# https://github.com/aws/aws-cdk/blob/v2.0.0-rc.6/packages/%40aws-cdk/aws-msk/lib/cluster.ts

$ stat package/lib/aws-msk/lib/cluster.js

What did you expect to happen?

<!-- What were you trying to achieve by performing the steps above? -->

I expected the L2 MSK Cluster construct to exist in the 2 RC line.

What actually happened?

<!-- What is the unexpected behavior you were seeing? If you got an error, paste it here. -->

It's not there.

Environment

Any.

Other

<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->


This is :bug: Bug Report

created time in 2 months

push eventblaenk/site

Jorge Israel Peña

commit sha 8f5a4e32f013e0fee3267c7497a2a1f7fd4983f1

Fixes to Java notes

view details

push time in 2 months

pull request commentpinojs/pino-pretty

Fix broken circular reference handling when filtering

https://github.com/blaenk/pino-repro

Output:

λ ~/code/pino-repro → main
» npm run build && npm start

> pino-repro@0.0.1 build /home/blaenk/code/pino-repro
> tsc -p .


> pino-repro@0.0.1 start /home/blaenk/code/pino-repro
> NODE_ENV=development node ./build/index.js

[2021-05-31 18:47:22.268] INFO: This is a test
[2021-05-31 18:47:22.271] INFO: Printing an object
    example: "value"
/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:39
    if (o instanceof Date) return new Date(o)
          ^

RangeError: Maximum call stack size exceeded
    at Function.[Symbol.hasInstance] (<anonymous>)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:39:11)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/pino-repro/node_modules/rfdc/index.js:58:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pino-repro@0.0.1 start: `NODE_ENV=development node ./build/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pino-repro@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/blaenk/.npm/_logs/2021-06-01T01_47_22_285Z-debug.log
blaenk

comment created time in 2 months

create barnchblaenk/pino-repro

branch : main

created branch time in 2 months

created repositoryblaenk/pino-repro

created time in 2 months

pull request commentpinojs/pino-pretty

Fix broken circular reference handling when filtering

I couldn't tell you.

All I know is that it's broken at the moment when printing objects with circular references. Ideally a user doesn't print such objects to begin with, but sometimes it's not up to one and it's not realistic to expect one to manually excise each circular reference lest this library crash.

I do know that it's due to the use of rfdc as mentioned in the PR. Please see the included test.

blaenk

comment created time in 2 months

PR opened pinojs/pino-pretty

Fix broken circular reference handling when filtering

I now updated from 4.7.1 to 5.0.1 and I kept getting an error regarding rfdc. Eventually tracked it down to this library. It seems like it was introduced in https://github.com/pinojs/pino-pretty/pull/180

/home/blaenk/code/app/bot/node_modules/rfdc/index.js:39
    if (o instanceof Date) return new Date(o)
          ^
RangeError: Maximum call stack size exceeded
    at Function.[Symbol.hasInstance] (<anonymous>)
    at clone (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:39:11)
    at clone (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:58:17)
    at cloneArray (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:31:17)
    at clone (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:40:34)
    at cloneArray (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:31:17)
    at clone (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:52:25)
    at clone (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:58:17)
    at clone (/home/blaenk/code/app/bot/node_modules/rfdc/index.js:58:17)

It seems like the log is unconditionally "cloned" via rfdc when ignore is set in the options.

https://github.com/pinojs/pino-pretty/blob/357590425b1d0b23e4e92cbf985d5de0dae1c194/lib/utils.js#L474

By default, rfdc doesn't track circular references so naturally it gets stuck infinitely traversing the circular references.

It seems rfdc does have a feature to track circular references albeit at the cost of performance since it has the overhead of tracking the references. I think that's ok since pino-pretty is meant for development uses anyway (AFAIK), and we already handle circular references in other areas (stringifying https://github.com/pinojs/pino-pretty/pull/50).

I do know that this didn't used to be a problem in 4.7.1. I also know regular console.log() is able to handle this of course (it'll simply print something like <ref *1>).

I'm not very familiar with tape and this was already a bit of an unexpected time sink, so please feel free to directly push any further commits to this branch and take over.

+23 -1

0 comment

2 changed files

pr created time in 2 months

create barnchblaenk/pino-pretty

branch : handle-circular-references

created branch time in 2 months

fork blaenk/pino-pretty

🌲Basic prettifier for Pino log lines

fork in 2 months

issue commentgrubersjoe/react-github-calendar

Ability to reuse component for non-github use cases

That's great to hear! Thank you for responding.

blaenk

comment created time in 2 months

issue openedgrubersjoe/react-github-calendar

Ability to reuse component for non-github use cases

This seems like a nice component!

I think it'd be great if one could use its main functionality (calendar heatmap) for other non-GitHub uses by allowing one to pass in some values prop, circumventing any GitHub API calls.

Here are other components that allow this, but they don't seem as active:

  • https://github.com/haripo/react-github-contribution-calendar
  • https://github.com/freeCodeCamp/react-calendar-heatmap

created time in 2 months

startedreact-dropzone/react-dropzone

started time in 2 months

issue commentaws/aws-cdk

‼️ NOTICE: last modified date does not match with the last modified date of the retrieved parameters.

Does the new 2.0.0-rc.3 include the fix in 1.103? I have cdk and aws-cdk-lib updated to it, but I'm still running into the issue.

Error:

 ❌  Control failed: Error: Failed to create ChangeSet cdk-deploy-change-set on Control: FAILED, Parameters: [ssm:/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id:59:1619746225127] last modified date does not match with the last modified date of the retrieved parameters.

I think the parameter in question is this one:

[~] AWS::AutoScaling::LaunchConfiguration Cluster/Capacity/LaunchConfig ClusterCapacityLaunchConfigC44566A4 replace
 ├─ [~] ImageId (requires replacement)
 │   └─ @@ -1,1 +1,3 @@
 │      [-] "{{resolve:ssm:/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id}}"
 │      [+] {
 │      [+]   "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter"
 │      [+] }

However, I'm not explicitly referencing this myself AFAIK. Just double checked and I can't see anywhere where I am referencing anything like this.

I tried updating the stack via the web console, using the existing template without making any changes at all (is that the right process?) but I got the error:

Parameters: [ssm:/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id:59:1619746225127] were updated before values were used
MrArnoldPalmer

comment created time in 2 months

issue commentaws/aws-cdk

‼️ NOTICE: last modified date does not match with the last modified date of the retrieved parameters.

Mentioned this in the other issue but just a friendly reminder so it doesn't fall through the cracks: I'm happy to try this on the 2.0 line (I recently ported to from 1.x to 2 RC1) but I'm waiting for the 2.0 release to come through (last one was ~12 days ago).

MrArnoldPalmer

comment created time in 2 months

issue commentaws/aws-cdk

ECS parameter last modified date does not match

Thanks, I'll try to keep an eye out for when it's released to go ahead and try it.

Bullettoothtobi

comment created time in 2 months

issue commentaws/aws-cdk

ECS parameter last modified date does not match

I'd be happy to test but I recently ported to 2.0 RC1. Any chance a fix for that can be released as well?

Bullettoothtobi

comment created time in 2 months

push eventblaenk/site

Jorge Israel Peña

commit sha 7296fdff4e7e94466222d6bd3f7280f1a8b144fd

Clarify STAR

view details

push time in 2 months

push eventblaenk/site

Jorge Israel Peña

commit sha b83f52de3a4888d976349a344e455033598a6567

Add toc to typescript

view details

push time in 3 months