Fix iPhone X course logo animation

:shipit: Mobile app from this branch has been deployed to:
https://expo.io/@thebrain/thebrain-mobile-fixIPhoneXCourseLogo
Download the Expo app and scan this QR code to get started!

Web is available here: http://thebrain-web-fixiphonexcour-7baacef.s3-website-us-east-1.amazonaws.com
And if you must, you can connect to the graphql server here: https://6479drvgk1.execute-api.us-east-1.amazonaws.com/dev/graphql


Upgraded ES to v5.6.3

@seut Thanks for catching that. Also update junit: https://github.com/crate/crate/pull/6399/files#diff-6609d3993f743e20b8fba4a109413ff5


jaeger demo problem

i downloaded the code and start the demo code adservice, it run successfully, but it can't be found in the jaeger admin,please help me

Makesure tracing is enabled and jaeger endpoint is correct.
https://github.com/go-micro/demo/blob/327d0c193f2a8af4bed40f40d11d4b0496aeb058/src/adservice/config/config.go#LL16C1-L16C1


Add config reload script

Closes https://github.com/free5gc/free5gc/issues/517

@oliveiraleo
Thanks. It's useful for us.

I finally had time to add some documentation regarding the script.
I won't open a docs related issue as I already have this one in place and they are directly correlated. The PR on the docs repo is https://github.com/free5gc/free5gc.github.io/pull/82
BTW, thank you guys for being open to community contributions :)


error when running Appendix A.1

when running Appendix A.1 code
import tmm_fast as tmmf
import numpy as np
L = 12
d = np.random.uniform(20, 150, L)*1e-9 # thicknesses of the layers
d[0] = d[-1] = np.inf # set first and last layer as injection layer
n = np.random.uniform(1.2, 5, L) # random constant refractive index
n[-1] = 1 # outcoupling into air
wl = np.linspace(500, 900, 301)*1e-9
theta = np.deg2rad(np.linspace(0, 90, 301))
result = (tmmf.coh_tmm('s', n, d, theta, wl)['R']+ tmmf.coh_tmm('p', n, d, theta, wl)['R'])/2

get error
Traceback (most recent call last):
  File "d:\project\tmm_fast\appendix_01.py", line 10, in <module>
    result = (tmmf.coh_tmm('s', n, d, theta, wl)['R']+ tmmf.coh_tmm('p', n, d, theta, wl)['R'])/2
  File "d:\project\tmm_fast\tmm_fast\vectorized_tmm_dispersive_multistack.py", line 125, in coh_vec_tmm_disp_mstack
    check_inputs(N, T, lambda_vacuum, Theta)
  File "d:\project\tmm_fast\tmm_fast\vectorized_tmm_dispersive_multistack.py", line 498, in check_inputs
    assert N.ndim == 3, 'N is not of shape [S x L x W] (3d), as it is of dimension ' + str(N.ndim)
AssertionError: N is not of shape [S x L x W] (3d), as it is of dimension 2

tmm-fast version 0.2.1
os Windows 11
torch 2.4.0
numpy 2.0.1

Hey, I think this is a problem with some api changes that we have done with the package. In the old version, if you would specifiy a range of wavelengths but a single value for the refractive index n, we automatically assume a dispersionless material and would tile the refractive index value to the same shape as the wavelength. Since most realistic materials have dispersion, we changed this and ask the user to specify the refractive index over wavelenght by himself - however, I agree that we should make this more clear in the error message.


This fixes selecting nodes without keys.

This apparently fixes issue #80

Thank you very much @josegomezr


Change DBCurrency scaffolded form field to CurrencyField (fixes #8246)

Update DBCurrency to scaffold a CurrencyField by default, rather than a NumericField as it currently does. Resolves issue #8246.
Example result:

@dhensby Added and squashed.


Creating account for previously unused network fails

Initially we get status for all networks that is enabled on the extension. After user have picked from default account selection, we only query status for active accounts.
If user adds a new account for a network not currently being watched, it would crash with error binding to "completedScan" on account state.
It wouldn't fix itself either, as visible in this screenshot, the City network has zero selected indexers:

This was potentially fixed by handling the null exception that occurred and fixed in commit a8e657b74ce7d04e82da28cf79c8f155db36d280. Must be verified by others.

This has now been additionally improved by running indexing on-demand whenever network status has been refreshed.


Uploaded time of files is off

Bug
Uploaded time of files is off
TODO:  create separate time epic
Steps to reproduce

Go to Biblio
Go to full text & files
Look at the time
Upload a file
See the time is off by one hour

I can confirm this. Timestamp is created correctly in UTC timezone, but shown incorrectly (it should convert from UTC to local time)

@nicolasfranck It's still off unfortunately, it was 17:13 on my machine

Same here: https://backoffice.bibliotest.ugent.be/publication/01GRRB1X35W7WE5FB7W8KQKX9J?redirect-url=%2Fpublication&show=files
file was upload at 13:56, but it shows 12:56. Apparently "local" time means something different on the server. Will try to force it to "Europe/Brussels"

@mietcls what seems most intuitive to you?

show utc time with timezone indication
show brussels time
show local time of the user (extract timezone from request)

I would always add timezone information at the end.
Just keeping utc as our default would just anger 99% of our users, not? They would always have to do the math.

@nics showing the local time of the user is the best option, as we don't know where they are. People usually point it out when they notice the hour is not the same on the device they are using. Devices use the local time as well.

I'm also going to create an issue to fix the date notation for records later – the "9 months ago" is not useful for the reviewers nor researchers at this point (oldest record we can find)

Was the global default already added?
This one was 2 hours off:

For documentation purposes: does this include daylight savings time? If not, it might be off:

sprig date function was the culprit


renyi: add 2020, 2021, 2022 pub demo

Describe your changes
Checklist before requesting a review

[ ] Indicate your name and the content of the pull request in the title, e.g., "NAME: update personal profile".
[ ] After submitted, remember to check about the preview in the pull request
[ ] Make sure the update follows the instructions provided by the lab and the template.

remove cache and try again


Update Composer dependencies (2024-06-23-00-18)

Visual regression test passed!
View the visual regression test report


Listening for ad events, changing the unit ID

Hi fbricker, thanks again for this extension. I had a few basic questions for you:

I saw the issue regarding checking to see if an ad is ready. From my understanding this is not currently implemented. Do you have a preferred way of handling this?

For example, right now I can basically only call
AdMob.showInterstitial(0);
and wait to see what happens. if the ad isn't loaded, nothing happens at all. Should I create my own 'Ad is loading' window, and time it out after X seconds? That way the user understands that the app at least tried to load an ad.

Related to the above question: do ads only get one chance to display on screen? If I call 'showInterstitial' and nothing happens, do I have to worry about the ad randomly showing up later?

Lastly, am I free to change the unit id during runtime, after it is initially set? I would like to randomize the unit id each time so I can share profits between myself and my partner. As soon as one ad is finished, can I make another call to initAndroid()/initIOS() and just pass in a new id? Not sure if this will result in unintended behavior.

Thanks!

Hi, about the loading events, I'll try to add them soon. Anyway, I've fixed one issue and now the interstitials loads when you call init the first time (this won't fix your case 100% but will help I guess).
About changing the AdUnit during runtime, I'm not sure if google will allow that. I've asked some people from AdMob support team and they've told me that AdMob allows just one Account per App (so you can have multiple ad units, but all of them needs to come from the same account).
I'm not sure if this is correct (since it's probably that the person who answered didn't understand the idea, or that he even didn't ask to the right person inside AdMob), but this is the information I had from Google about this (and that's why I didn't bother in allowing the extension to switch ad-units).
If you do have some information or anything from google saying that this is allowed, I'll modify the extension for sure :)
Thanks!

I spoke with my publisher today and they claimed they have already published several apps that make use of changing the AdUnits at runtime. Whether or not they are supposed to do it is another issue.
Worst case scenario they demand I implement this, can I just keep making new calls to init?

Hi, sorry for the late response here. Are you still needing this?
We can add this to the next release if it's useful :)

I've closed the issue since I guess you no longer need this feature. If you need it, please re-open it.

Oh, sure thing. Sorry for not responding. Thanks!
On Sun, Apr 10, 2016 at 12:30 PM, Federico Bricker<EMAIL_ADDRESS>
wrote:

I've closed the issue since I guess you no longer need this feature. If
you need it, please re-open it.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/openfl/extension-admob/issues/8#issuecomment-208011505


Progress events

Just wanted to know: Is there any intend to provide an API for some sort of progress event? Where the underlying implementation is able to inform the user about how many bytes have already been downloaded/still need to be downloaded.
Thanks in advance! 😀

Original question: http://stackoverflow.com/questions/37787123/is-it-possible-to-let-webpacks-system-import-use-ajax-for-progress-events/37835802

No plans for such feature out-of-the-fox, but you can implement your own fetch hook to have more control over what you are fetching. Additionally, the metadata object will be exposed for each module status object (https://whatwg.github.io/loader/#module-status-internal-slots), which will give you some details if the fetching process is done by the default fetch hook, but that is not an event of any sort.

Why shouldn't this not planned?
This is actually a good feature, right?


Switch to factory method to support multiple environments

Switching to factory method for supporting multiple environments instead of old approach of multiple ifs throughout main code. For example:
(function(factory) {
  var root = (typeof self === 'object' && self.self === self && self) ||
      (typeof global === 'object' && global.global === global && global);

  if (typeof define === 'function' && define.amd) {
    define(function() {
      root.morjs = factory(root);

      return root.morjs;
    });
  } else if (typeof module !== 'undefined' && module.exports) {
    exports = module.exports = factory(root);
  } else {
    root.morjs = factory(root);
  }
}(function(root) {
  var morjs = {};

  // ...

  return morjs;
}));

This work has been completed in the develop branch so will be included in the v1.2.0 release.


Fix a build error

This PR prevents the following build error:
NoMethodError:
  undefined method `cop_name' for nil
# ./lib/rubocop/cop/badge.rb:52:in `match?'
# ./lib/rubocop/cop/registry.rb:300:in `resolve_badge'
# ./vendor/bundle/ruby/3.3.0/gems/rubocop-rspec_rails-2.28.3/lib/rubocop-rspec_rails.rb:30:in `qualified_cop_name'

https://github.com/rubocop/rubocop/actions/runs/8656558784/job/23737409762
This error is due to a monkey patch in rubocop-rails_rails: https://github.com/rubocop/rubocop-rspec_rails/pull/14
The monkey patch in rubocop-rspec_rails should also be fixed, but this patch prevents RuboCop from failing due to dependencies. RuboCop does not depend on Rails, so the ideal solution would be to remove the dependency on rubocop-rspec_rails gem. However, this is not possible currently because rubocop-rspec is still dependent on it.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Thanks!

This was not an appropriate workaround as a development dependency because it involved updating the production code. Instead, #12837 has been opened.


Currently we use too many different duration formats. Need to be more unified.

Too many compared to what? The issue is a bit vague. AFAIK we have exactly same formats as on the Toggl web app.


Error when Path to protoc contain space character

Path to protoc nonsuport contain space character. For example if my project folder path like D:/Unity Leaning, when I click Force Compilation , it console error cannot find folder D:/Unity

Ah shoot, I just realized my game contains no space in paths at all out of a habit of naming folders in pascal case. I will have a look at it.
Should be around sending commands to System.Diagnostics.Process (Bottom of ProtobufUnityCompiler.cs) where we can escape with quotes or something just in case you want to fix it yourself.

OK, I find it is "excPath" filed , and str.Replace(" ","") to take out the space.


Android: Instantiating TFLite Interpreter with GPU delegate takes 2.5 seconds.

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS Catalina v10.15.7
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: Pixel 3a
TensorFlow installed from (source or binary): Binary
TensorFlow version (use command below): v2.4.0
Python version: 3.8.0
Bazel version (if compiling from source): -
GCC/Compiler version (if compiling from source): -
CUDA/cuDNN version:
GPU model and memory: Adreno 615

Describe the current behavior
The instantiation time of tiflite interpreter with GPU delegate on Android is extremely high. For some models It takes about 2.5 seconds to instantiate it. This behavior was tested with various segmentation models of different sizes (500Kb - 12Mb) and on different  mobile devices. The instantiation time very slightly dependent on the model size and is faster on flagship devices (such as Samsung Galaxy S20) but overall it is very slow. Initializing an interpreter with the same model without GPU delegate is sub millisecond.
Standalone code to reproduce the issue
// interpreterBinary: ByteBuffer direct allocated byte buffer.
val options = Interpreter.Options().addDelegate(GpuDelegate())
val stopwatch = Stopwatch.createStarted() // start trace
val interpreter = Interpreter(interpreterBinary, options)
stopwatch.stop() // end trace

@alexanderar  Can u download the Android prebuilt benchmark tools from https://www.tensorflow.org/lite/performance/measurement
And run it in the device to see if the gpu delegate is fallback to cpu.
I notice  tat in my case the transpose  convolution is never used using GPU and is using CPU fallback.
U might try
./android_aarch64_benchmark_model  --graph=unet.tflite  --use_gpu=true --enable_op_profiling=true
or
./android_aarch64_benchmark_model  --graph=unet.tflite  --use_nnapi=true --enable_op_profiling=true
Not sure u are using quantitated model or not. But try to use floating model and int8 model to see if there is any changes.
If u see :
[Node type]	  [count]	  [avg ms]	    [avg %]	    [cdf %]	  [mem KB]	[times called]
TfLiteNnapiDelegate	        4	    19.800	    38.140%	    38.140%	     0.000	        4
CONV_2D	        3	    17.773	    34.235%	    72.375%	     0.000	        3
TRANSPOSE_CONV	        2	    13.034	    25.107%	    97.482%	     0.000	        2
ADD	        2	     1.307	     2.518%	   100.000%	     0.000	        2
Like above , TfLiteNnapiDelegate contains all layers using nnapi acceleration.
Which for some reason the CONV_2D, TRANSPOSE_CONV and ADD layers areall fall back to CPU.
Related to https://github.com/tensorflow/tensorflow/issues/46098

@alexanderar  Can u download the Android prebuilt benchmark tools from https://www.tensorflow.org/lite/performance/measurement
And run it in the device to see if the gpu delegate is fallback to cpu.
I notice  tat in my case the transpose  convolution is never used using GPU and is using CPU fallback.
U might try
./android_aarch64_benchmark_model  --graph=unet.tflite  --use_gpu=true --enable_op_profiling=true
or
./android_aarch64_benchmark_model  --graph=unet.tflite  --use_nnapi=true --enable_op_profiling=true
Not sure u are using quantitated model or not. But try to use floating model and int8 model to see if there is any changes.
If u see :
[Node type]	  [count]	  [avg ms]	    [avg %]	    [cdf %]	  [mem KB]	[times called]
TfLiteNnapiDelegate	        4	    19.800	    38.140%	    38.140%	     0.000	        4
CONV_2D	        3	    17.773	    34.235%	    72.375%	     0.000	        3
TRANSPOSE_CONV	        2	    13.034	    25.107%	    97.482%	     0.000	        2
ADD	        2	     1.307	     2.518%	   100.000%	     0.000	        2
Like above , TfLiteNnapiDelegate contains all layers using nnapi acceleration.
Which for some reason the CONV_2D, TRANSPOSE_CONV and ADD layers areall fall back to CPU.
Related to https://github.com/tensorflow/tensorflow/issues/46098

@alexanderar  If you are targeting for Android phone with qualcomm chipset only.
I would recommend to use qualcomm snpe sdk directly to do the inference.
There are some many cases that the TFLite fall back to CPU implementation..
https://developer.qualcomm.com/docs/snpe/overview.html

@alexanderar  If you are targeting for Android phone with qualcomm chipset only.
I would recommend to use qualcomm snpe sdk directly to do the inference.
There are some many cases that the TFLite fall back to CPU implementation..
https://developer.qualcomm.com/docs/snpe/overview.html

@ek9852 Actually I am not even talking about running the model. Just the instantiation of the interpreter takes a very long time:
val interpreter = Interpreter(interpreterBinary, options) on Pixel3a takes 2.8 seconds for some networks. For other is the quite fast. I thought that it may somehow depend on the model size but in this specific case the model is just  400Kb.

@ek9852 Actually I am not even talking about running the model. Just the instantiation of the interpreter takes a very long time:
val interpreter = Interpreter(interpreterBinary, options) on Pixel3a takes 2.8 seconds for some networks. For other is the quite fast. I thought that it may somehow depend on the model size but in this specific case the model is just  400Kb.

Yup, that is expected, unfortunately :-(. the GPU delegate needs to generate shaders & constants during initialization, so that takes a bunch of time. It shouldn't be as high as 2.5s for a 400kb model; which is strange. Can you share the model (even if untrained)? We are working on ways to optimize this in the future.
For now, if your model is quantized, using the NNAPI delegate will probably do a better job for you. For float models, try XNNPack.

Yup, that is expected, unfortunately :-(. the GPU delegate needs to generate shaders & constants during initialization, so that takes a bunch of time. It shouldn't be as high as 2.5s for a 400kb model; which is strange. Can you share the model (even if untrained)? We are working on ways to optimize this in the future.
For now, if your model is quantized, using the NNAPI delegate will probably do a better job for you. For float models, try XNNPack.

@alexanderar could you share the tflite model you used? To me 2.5s on Pixel 3a looks too much even though the shader compilation time is considered. I want to see what's going on there.

@alexanderar could you share the tflite model you used? To me 2.5s on Pixel 3a looks too much even though the shader compilation time is considered. I want to see what's going on there.

@terryheo, here is the model. It is untrained but I think that it should be enough to reproduce the issue.
I tested it multiple times and it took me about 3.3 sec on average on Pixel 3a device with this code (simplified):
val options = Interpreter.Options().setUseNNAPI(false)
   .setNumThreads(Runtime.getRuntime().availableProcessors())
   options.addDelegate(GpuDelegate())

interpreter = Interpreter(interpreterBinary, options)

model.tflite.zip

@terryheo, here is the model. It is untrained but I think that it should be enough to reproduce the issue.
I tested it multiple times and it took me about 3.3 sec on average on Pixel 3a device with this code (simplified):
val options = Interpreter.Options().setUseNNAPI(false)
   .setNumThreads(Runtime.getRuntime().availableProcessors())
   options.addDelegate(GpuDelegate())

interpreter = Interpreter(interpreterBinary, options)

model.tflite.zip

I don't think this is the case with the recent version since TFLite GPU has a cache for shader compilation.
Plz let me know if you still have the issue.
Thanks.

@terryheo Is there a way to pre-compile shaders?

@terryheo Is there a way to pre-compile shaders to reduce init time?

Please take a look https://www.tensorflow.org/lite/performance/gpu#delegate_serialization


Cow: Watch (?-i:dankeu420)(?# Telegram)

Cow requests the watch of the watch_keyword (?-i:dankeu420)(?# Telegram). See the MS search here and the Stack Exchange search in text, in URLs, and in code.

(?-i:dankeu420)(?# Telegram) has been seen in 1 true positive, 0 false positives, and 0 NAAs.


Create fees.yml and populate values across site

Trello card
Context
Changes proposed in this pull request
Guidance to review
Pages where changes have been made:

https://get-into-teaching-app-review-3966.test.teacherservices.cloud/funding-and-support/tuition-fees
https://get-into-teaching-app-review-3966.test.teacherservices.cloud/funding-and-support/tuition-fee-and-maintenance-loans

I need to fix Steps to become a teacher (and other pages where we're using frontmatter - these won't work yet):

I'm going to split this up to make reviewing easier.


Update Android Gradle plug-in to 2.1.2

Thanks, merging!

@samtstern Welcome.
Just curious: Are you not using the standard GitHub pull request merge mechanism? I noticed there was no merge commit created, and the merged commit hash (c13920f) is different from my original commit (4ad4f44), which results in me having to force-delete my local branch:
error: The branch 'update-plugin' is not fully merged.

@friederbluemle Github has a new "squash and merge" option that I have been using lately but I didn't realize it would cause pain for people submitting PRs.  I'll go back to using the standard method when I can, thanks for the notice.

@samtstern Ah yes, I saw the new "squash and merge" option, and thought it might be related to that. It's definitely a useful feature, especially if there are lots of "fixup" and/or work-in-progress commits, and the PR submitter did not squash/rebase manually.
For pull requests with only a single commit, or a few commits that are independent from each other and logically structured, it might be better to use the regular "merge" option. It lets the submitter clearly see which commits went into the upstream repo, and allows him/her to cleanly delete their local branch.
Thanks! :+1:


Support Dark mode?

Marked2 on Mac has great theme support but would a simple dark mode too.

Literally this is the only reason I'm sometimes looking for alternatives.

Added dark mode in v1.4.0.


Remove BDD Tutorial

The content of the BDD tutorial seems to be mostly duplicated by the
BDD section of the documentation. However the BDD section recommends
example mapping while the BDD tutorial talks about discovery workshops.

Thanks @mpkorstanje - I hadn't spotted this page yet.


FNA++ code

Hello! Thanks for the great contribution, keep up the good work!
I was wondering if there is any estimation for when the FNA++ code will be available

Hi! Thanks for your attention. We plan to release the FNA++ code after the paper is on publication. Please pay attention to subsequent updates if needed.

Hi @JaminFong
Any updates on when FNA++ might become available ? Any estimation :) ?

Hi @JaminFong
Any updates on when FNA++ might become available ? Any estimation :) ?

Hi, I'm sorry as I'm occupied with other things recently. There is not a specific timeline for releasing the new code yet, but the implementation is not hard. You could have a try with it, and please ask if any questions.

Hello! thanks for your good work!
I was wondering if when the FNA++'s parameter remapping func code will be available...
I don't know..how can I implement for expanding parameter remapping(width, kernel...).
Could I know that....? 😭😭😭 @JaminFong


App crashes using iPhone with iOS 12.4.8

Hello,
when trying to run my app with the latest GDPerfomanceView-Swift 2.1.0 on an iPhone with iOS 12.4.8 it crashes upon start at:
extension UIApplication {

    var keyWindow: UIWindow? {
        if #available(iOS 13, *) {
            return UIApplication.shared.windows.first { $0.isKeyWindow }
        } else {
            return UIApplication.shared.keyWindow
        }
    }
...
}

this results in an endless getter loop:
#2	0x00000001087ab9b4 in UIApplication.keyWindow.getter at Example/Pods/GDPerformanceView-Swift/GDPerformanceView-Swift/GDPerformanceMonitoring/Extensions.swift:28
...
#5309	0x00000001087abb2c in UIApplication.keyWindow.getter at Example/Pods/GDPerformanceView-Swift/GDPerformanceView-Swift/GDPerformanceMonitoring/Extensions.swift:31

Hello,
Thanks for your report. Please try 2.1.1.


display link in 2 lines only not more

hey guys, i want to make my linke show only on 2 line only

and i want to make it like

and the code of css is [
.list_item_link {
color: Black;
font-size: 13px;
line-height: 1.7;
}
]
but i want to display only 2 lines no more.
thanks in advanced!!!!

sorry i am new to github issues

Thank you for your access into our repository.
I will close your issue(pull request) as it is not related to this repository.
If any issue and question related to GridDB server or client, please open a new issue.


Add storage autoscaling policy to MSK cluster

what

Add backwards-compatible support for broker storage autoscaling. If var.storage_autoscaling_max_capacity is not set, the autoscaling max is the current var.broker_storage_size.

why

Cost optimizations from as-needed storage resizing and lower management burden

references

https://docs.aws.amazon.com/msk/latest/developerguide/msk-autoexpand.html

/test test/bats


Fix off-by-one-byte multi-node-port mark and mask

Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[x] All code is covered by unit and/or runtime tests where feasible.
[x] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[ ] All commits are signed off. See the section Developer’s Certificate of Origin
[ ] Provide a title or release-note blurb suitable for the release notes.
[ ] Thanks for contributing!

Fixes: #20797
See detailed explanation in issue 20797.
The MarkMultinodeNodeport and MaskMultinodeNodeport values of 0x80 appear to be incorrect as this targets the
leftmost bit of the cluster id of the identity serialised in the mark. This results in corrupting the leftmost cluster id bit and ingress denials in network policies as the full source identity fails to match.
Instead these constants should be 0x8000 in order to target the 2nd byte of the mark that is reserved by Cilium for the purpose of encoding non-identity information in the mark.

This is wrong according to https://github.com/cilium/cilium/issues/20797#issuecomment-1239611392, so closing.


pack update-stack allows a user update an existing stack

WHEN I run pack update-stack my.custom.stack.id --run-image my-org/run --build-image my-org/build
THEN the stack with the ID my.custom.stack.id will update the existing images for the stack in the config.toml with the ones specified
AND the user will see the following message "<stack id> successfully updated."
Notes

Multiple run and build images can be provided
If stack id does not exist - return the following message "<stack id> does not exist. Please run pack update-stack with an existing stack ID."

I have assumed that if either run-image or build-image is not specified then that entry is unchanged. This means it is NOT possible for a user to set the array for either to empty; this seems reasonable to me (why would you want to do that after all?)

@dgodd - Agreed- seems like a weird edge case to support

@dgodd
Seeing this error message -
ssisil:bin ssisil$ pack update-stack io.buildpacks.stacks.scott-xenial --build-image ssisil/build:xenial-2 --run-image ssisil/run:xenial-2
Error: Missing stack: stack with id "io.buildpacks.stacks.scott-xenial" not found in pack config.toml

Should be this
 <stack id> does not exist. Please run pack update-stack with an existing stack ID.
``


User type dropdown not working in Italian

Report from @gbonanome that the user type dropdown on the manage users page is not working when switched to Italian

"I can confirm that switching to the English interface works for me. Instead on the italian interface there's a javascript error (TypeError: Cannot read property 'name' of undefined)"

fixed, this was a localization error. have localized the usertypes on page load, now the functionality behaves as expected.
will update labels when deployed.

@gbonanome this is fixed now!

@tangentfairy :+1: thanks! It works :smiley:


Can't startxcfe4, trying to delete .ICEauthority gives i/o error

I've been successfully running jessie off an SD card, but now I can't.  I accidentally popped the SD card with jessie and xfce running.  The issue seems to be the .ICEauthority is corrupt but I can't delete it. Symptoms are:
chronos@localhost / $ sudo enter-chroot -c /media/removable/SD\ Card/
Enter encryption passphrase for jessie:
Entering /media/removable/SD Card/jessie...
(jessie)ch@localhost:~$ startxfce4
/usr/bin/startxfce4: Starting X server

_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

X.Org X Server 1.16.4
Release Date: 2014-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.16.0-0.bpo.4-armmp-lpae armv7l Debian
Current Operating System: Linux localhost 3.14.0 #1 SMP PREEMPT Tue Oct 4 15:34:50 PDT 2016 armv7l
Kernel command line: cros_secure console= loglevel=7 init=/sbin/init cros_secure oops=panic panic=-1 root=/dev/dm-0 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="1 vroot none ro 1,0 3334144 verity payload=PARTUUID=9326eec4-e51a-6443-a111-21b240ef0a83/PARTNROFF=1 hashtree=PARTUUID=9326eec4-e51a-6443-a111-21b240ef0a83/PARTNROFF=1 hashstart=3334144 alg=sha1 root_hexdigest=ac48fd9506d57e8a82fbaa48b192a3138ccdd5f8 salt=95a4db2db2212fdae98b58569c94b87de70bf2bbfc9dfff6ff1fa804b6fa9595" noinitrd vt.global_cursor_default=0 kern_guid=9326eec4-e51a-6443-a111-21b240ef0a83
Build Date: 11 February 2015  01:18:06AM
xorg-server 2:1.16.4-1 (http://www.debian.org/support)
Current version of pixman: 0.32.6
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.crouton.1.log", Time: Tue Oct 18 19:41:36 2016
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
crouton: version 1-20160902144033~master:9f8e9a22
release: jessie
architecture: armhf
xmethod: xorg
targets: xfce
host: version 8530.96.0 (Official Build) stable-channel veyron_speedy
kernel: Linux localhost 3.14.0 #1 SMP PREEMPT Tue Oct 4 15:34:50 PDT 2016 armv7l GNU/Linux
freon: yes
xfce4-session: Unable to access file /home/ch/.ICEauthority: Input/output error
Running exit commands...
/usr/bin/xinit: connection to X server lost

waiting for X server to shut down Hangup
(EE) Server terminated successfully (0). Closing log file.

edit-chroot output:
chronos@localhost / $ sudo edit-chroot -c /media/removable/SD\ Card/ -all
Password:
name: jessie
encrypted: yes, locked
Unmounting /media/removable/SD Card/jessie...

I can't (from within the chroot) delete /home/ch/.ICEauthority -- I get the same input/output error (rm -f  doesn't help either)

It just needed fscking with the appropriate partition unmounted.  That took some fiddling in itself.

@ChrisHodgesUK, Thanx for reporting back and letting us know what you did to fix it.


Allowing data and the lite binary to reside in different directories

Hello,
right now lite assumes that the lite binary will be right next to the data directory - but that might not hold true in practice. E.g. linux distros would generally prefer having lite in /usr/bin while having the data in /usr/share/lite. It'd be nice if lite had a toggle to set that during build time - that could go hand-in-hand with #48 , e.g. by adding a "@DATADIR@" directive that's then replaced during compiletime instead of using the EXEDIR. I currently just patch around this for Alpine Linux.

Pretty straightforward to add the required build time machinery for this with a definition in cflags of build.sh :+1: Seems like it'd need a separate concept for DATADIR and EXEDIR lua-side and to move the existing code away from using the latter.

Right, that'd probably work too - I don't use C too often so I usually don't think of using definitions and macros :)

I don't want to encourage a decoupling of the binary and data folder -- that is, both should be kept in sync with one another and always remain a pair. I appreciate this makes lite difficult to package in regards to package managers, to keep in-line with the project's goals I want to encourage the practise of having a per-user copy of lite instead of a system-wide install.

I just bumped into this trying to setup packaging for Arch Linux as well. We can patch like Alpine did, but please reconsider this. If you want to allow for the use case of user-local software that's fine, but that's not how most Linux distributions work nor haw many of us want our software.

@rxi: it seems that if one want both the coupling of Lua files to the executable and to adhere to Unix custom the bundling suggested by @sherief in #82 should be worth of consideration. For how to technically realize it see my comment (also in subsequent comments how to link statically SDL2).
In this way there will be a master copy of lite installed system-wide and possible customization (of Lua files) installed locally per each user (only customized Lua files need to be copied from memory to the local file system; so if a user does not customize lite, it should not copy anything locally). I suggest to have a re-bundling option also, where the lite executable is re-bundled with customized Lua files and is written locally.
A problem that I see, even with the current un-bundled distribution, is with syncing updates with customization, but I have no suggestions to offer at this time.

@rxi another option is Zero Install, which is concisely described as:

… a decentralised cross-platform software installation system available under the LGPL. It allows software developers to publish programs directly from their own web-sites, while supporting features familiar from centralised distribution repositories such as shared libraries, automatic updates and digital signatures. It is intended to complement, rather than replace, the operating system's package management. 0install packages never interfere with those provided by the distribution.

A short introduction of 0install features is found in its documentation, a longer overview is this OSNews article: Decentralised Installation Systems.
But this requires that users download 0install before installing lite and I'm not sure this is in line with your minimalist philosophy.

I feel like all of this is kind of solving a problem that doesn't exist - many people on many different systems are able to run lite as it is.
It isn't hard to have system wide sdl2 insyalled. It isn't necessary to "install" anywhere beyond whacking it onto your path, which can be done with a symlink or editing your path directly. It isn't hard to build from source, and the source is pretty friendly to modification in the case where package maintainers want to be ideologically correct about where some lua scripts go.
3k stars implies this is much more widely used than any of the authors other projects, and maybe concessions to the public will end up being made but it's still a little minimal editor made mostly by a single author, originally for their own use. Approaching it as if it's the same thing as vscode with the same mass consumption standard practice goals seems a bit backward.
I should be clear that I think a define for where the data scripts go would be good to see and easy to implement, and would keep package maintainers happy. I've got a feeling all this exe bundling stuff is more or less irrelevant though.

@1bardesign That is too dismissive a treatment of the actually root of this issue report. OS packages are how many people get their software. There is a simple to fix BLOCKING issue that distros are having to monkey patch around.

Distro packages cannot just "whacking it into your path". Systems have a limited set of paths that work out of the box for everybody, we *have to put executable in those paths. Following the defacto file system layout used by tho vast majority of distros, the right place for something like this is /usr/bin/lite.

Disto packages cannot just dump a whole bunch of support files in a directory called "data" inside /usr/bin!

That's a very real problem and there is no easy mechanism provided to separate the two. It is patchable, but being able to put something in /usr/bin shouldn't require patching. Also patching is brittle, already I had to tweak the Alpine patch to work on the latest version of the code because context lines changed. That's not how software distribution should work.

/opt/lite seems like it'd be a much more sensible place than /usr/bin in its current state. Monolithic "everything together" software distribution is a common phenomenon. Not everything in the world complies with the ideals of FHS, and acting like maintainers are unaware of this is pretty strange.
As I finished with before:

I should be clear that I think a define for where the data scripts go would be good to see and easy to implement, and would keep package maintainers happy. I've got a feeling all this exe bundling stuff is more or less irrelevant though.

I'd be happy with a mechanism to keep user specific settings in a user-specific path. Ideally under ~/.config/lite/ where ~/.config is detected from XDG_CONFIG_HOME [1]. Alternatively as a simpler implementation maybe just looking for $HOME/.lite.lua and loading it if it exists on startup.

I don't want to encourage a decoupling of the binary and data folder -- that is, both should be kept in sync with one another and always remain a pair. I appreciate this makes lite difficult to package in regards to package managers, to keep in-line with the project's goals I want to encourage the practise of having a per-user copy of lite instead of a system-wide install.

I can certainly see the appeal of keeping the binary and data files together. In trying to learn more about what the project's goals are I see in the README.md file that:
it aims to provide something practical, pretty, small and fast, implemented as simply as possible; easy to modify and extend, or to use without doing either.

I think there is a tradeoff between implemented as simply as possible and to use without doing either. You can't possibly anticipate or cater to all of the ways users will want to use your software nor do I think you should try. Following common existing conventions (i.e. XDG) is a great way to meet users half-way though. If the mechanism is there the end users will often already know what they need to do to leverage it for their own use case.
 I use a lot of different packages and it would be a real pain if I had to maintain all of that software in my home folder manually. This is especially useful since I often use different local users on my machine to keep my work and personal files separate. I'd rather not have to keep two separate copies of the editor, the data files, and my user settings.

/opt/lite seems like it'd be a much more sensible place than /usr/bin in its current state. Monolithic "everything together" software distribution is a common phenomenon. Not everything in the world complies with the ideals of FHS, and acting like maintainers are unaware of this is pretty strange.

If I'm installing something in /opt it's because I can't be bothered to package it. I'd still prefer those files to be owned by root:root with a file mode of 0644 though.

https://www.freedesktop.org/wiki/Software/xdg-user-dirs/

I just found https://github.com/rxi/lite/issues/112 which is actually what I'm after. I've gone ahead and patched my copy to do what is suggested in that thread and load a configuration file from the user's home folder. This might be something we could accomplish with a plugin and therefore not require any changes to the editor itself.

I don't want to encourage a decoupling of the binary and data folder -- that is, both should be kept in sync with one another and always remain a pair. I appreciate this makes lite difficult to package in regards to package managers, to keep in-line with the project's goals I want to encourage the practise of having a per-user copy of lite instead of a system-wide install.

I am a packager and today I tried to create an openSUSE package for lite. I had to give up precisely because of its lack of adherence to the FHS and this is sad because it is a really great editor with no real alternatives in terms of both lightness, beauty and simplicity and I'd love to spread it to the openSUSE community :smiley:


Add site analytics

It would be awesome if we could get google analytics on this.

I actually think something like Mixpanel would be much more helpful than Google Analytics, since it'd give us insights into user actions (and allows us to do cohort analysis) rather than just showing us the basics, like which pages are being visited.

Cool  :+1:


Create table if doesn't exist?

Is there a way to ask the adapter to create the table if it doesn't exist?

Sorry, if I'm missing something really obvious but this snippet of code throws and error indicating UnhandledPromiseRejectionWarning: Error: Unknown database 'my_table'
var Keyv = require('keyv');
var keyv = new Keyv("mysql://user:pass@localhost:3306/my_table");


tlsh: 4.5.0 -> 4.9.3

Motivation for this change
Latest tagged version.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

PR #122745 can now be closed due to bitrot.

tlsh 4.10.0 has been released in the meantime (a few hours ago)

PR #122745 can now be closed due to bitrot.

That is not bitrot, it is just stale or in some limbo state.

tlsh 4.10.0 has been released in the meantime (a few hours ago)

New PR please.


interact dependency -- wrong path

When I do a fresh install of the fork, I'm seeing an error when starting my Ember app. The error states that it cannot find interact/dist/interact.js in bower_components. It looks to be because bower.json is referencing unstable as the version.
I'll submit a PR.

@marzubov you pointed out that the unstable branch is needed -- just need to figure out a way to make it work for install.


bash completion for connecting non-running containers to networks

#18906 added support for connecting stopped containers to networks. Before that, only running containers could be connected.
This PR adjusts bash completion to the new behavior.

LGTM 🐯

LGTM :green_heart: Thanks!


Feedback welcome: Headed vs NonEmptyList

I've chosen Headed over NonEmptyList for some reasons:

it's too long :stuck_out_tongue:
it's not actually a list
it can be confusing for people that may think it's exactly the same NonEmptyList available in cats/scalaz

On the other hand, there is a VERY GOOD reason to name it NonEmptyList: it’s the usual name used for that construct and people would be more likely to recognise what it does
I'll leave it as Headed for now, but I'm happy to change it to NonEmptyList (or other) if anybody feels strongly about it.

I'm thinking Headed is okay so long it isn't Traversable. I am however thinking that extending Traversable and implementing forEach could make this object much more useful anyway (then you get map et al without an intermediate method). Perhaps given that, the naming could change to be NonEmptySeq or something?

Closing as we've shipped headed now and there's been no other comments here. 👍


questions on running TRUST4

Hi there, thank you for this amazing tool.  My team as been using it a lot  (see issue #265) but when I try to reproduce the analysis I came up with a few questions.
I did 10x genomics kit 5` GEX and VDJ for alpha beta and gamma delta TCRs.
I am running the script like this (in this case for the vdj of gd tcells):
run-trust4 -f hg38_bcrtcr.fa
--ref human_IMGT+C.fa
-1 path/to/YWI006-VDJ_S1_L001_R1_001.fastq.gz
-2 path/to/YWI006-VDJ_S1_L001_R2_001.fastq.gz
--barcode path/to/YWI006-VDJ_S1_L001_R1_001.fastq.gz
--readFormat bc:0:15,r1:16:-1
-u path_to_10x_fastqs/YWI006-VDJ_S1_L001_R1_001.fastq.gz
--od path/to/trust4/output/
I have a few questions regarding the outputs of TRUST4.

my output folder contains some  outputed fasta files. How do I get rid of them?

are the barcodes matching the ones of cellranger when I process my GEX data? I want to match mu TRUST4 vdj annotation with the gene expression. One issue is that when we compare the overlap between barcodes of CellRanger VDJ and TRUST4 is that they dont overlap. do you correct for the white list of barcodes from 10x?

which scripts do you recommend running from Scripts and other post-analysis for TRUST4 folder to complete the analysis?

If I run the script like barcoderep-filter.py, do I keep the original data or the tsv/airr files get overwritten?

Again many thanks. We found trust4 to be most reliable tool for annotation of gd TCRs.
Best,
Daniel

run-trust4 -f hg38_bcrtcr.fa
--ref human_IMGT+C.fa
-1 path/to/YWI006-VDJ_S1_L001_R1_001.fastq.gz
-2 path/to/YWI006-VDJ_S1_L001_R2_001.fastq.gz
--barcode path/to/YWI006-VDJ_S1_L001_R1_001.fastq.gz
--readFormat bc:0:15,r1:16:-1
-u path_to_10x_fastqs/YWI006-VDJ_S1_L001_R1_001.fastq.gz
--od path/to/trust4/output/

For the command line, I think TRUST4 cannot handle the mixed single-end and paired-end data. So the "-u" for the VDJ part will be ignored when "-1/-2" is given.

my output folder contains some outputed fasta files. How do I get rid of them?

You can use the option "--clean INT", so TRUST4 will remove those files after running.

are the barcodes matching the ones of cellranger when I process my GEX data? I want to match mu TRUST4 vdj annotation with the gene expression. One issue is that when we compare the overlap between barcodes of CellRanger VDJ and TRUST4 is that they dont overlap. do you correct for the white list of barcodes from 10x?

You can provide the option "--barcodeWhitelist whitelist_file" for barocde correction. The whitelist file is somewhere in the CellRanger folder. Nevertheless, you shall still observe a decent amount of barcode overlap. Did you find no overlap at all?

which scripts do you recommend running from Scripts and other post-analysis for TRUST4 folder to complete the analysis?

The trust-stats.py provides limited statistics, like Shannon entropy and clonality, on diversity measures. Other packages like scRepertoire will provide more analysis functions and visualizations.

If I run the script like barcoderep-filter.py, do I keep the original data or the tsv/airr files get overwritten?

For the TCR data, I don't think you need to run the barcoderep-filterlpy. It is mainly to deal with the excessive expression from plasma B cells that may cause leaked IGH/IGK/IGL into other cell's droplet. It will generate a new barcode report file, and you can rerun trust-airr on the new barcode report file to get the new airr file.
Hope this helps.

Could you please show me your running commands and the output on the screen?

What is the output from TRUST4 on the screen? So I can check which step it failed?

trust4_vdj_gex.sh: line 14: /nethome/daniel.fonseca/Documents/scRNA/10x_refs/barcodes/737K-august-2016.txt: Permission denied
Checking gd-* files in: /nethome/daniel.fonseca/vdj_data
Processing TRUST4 gd index: gd-1
[Mon Oct  7 22:27:59 2024] TRUST4 begins.
[Mon Oct  7 22:27:59 2024] SYSTEM CALL: /nethome/svc.build/modules/easybuild/software/TRUST4/1.0.14-GCC-11.3.0/bin/fastq-extractor -t 1 -f /nethome/daniel.fonseca/Documents/scRNA/10x_refs/trust4/hg38_bcrtcr.fa -o /nethome/daniel.fonseca/Documents/natural_immunity_project/NI_031/output/vdj_gd/TRUST_gd-1_R1_001_toassemble  --barcodeWhitelist  --readFormat bc:0:15,r1:16:-1 -1 /nethome/daniel.fonseca/vdj_data/gd-1_R1_001.fastq.gz -2 /nethome/daniel.fonseca/vdj_data/gd-1_R2_001.fastq.gz --barcode /nethome/daniel.fonseca/vdj_data/gd-1_R1_001.fastq.gz
system /nethome/svc.build/modules/easybuild/software/TRUST4/1.0.14-GCC-11.3.0/bin/fastq-extractor -t 1 -f /nethome/daniel.fonseca/Documents/scRNA/10x_refs/trust4/hg38_bcrtcr.fa -o /nethome/daniel.fonseca/Documents/natural_immunity_project/NI_031/output/vdj_gd/TRUST_gd-1_R1_001_toassemble  --barcodeWhitelist  --readFormat bc:0:15,r1:16:-1 -1 /nethome/daniel.fonseca/vdj_data/gd-1_R1_001.fastq.gz -2 /nethome/daniel.fonseca/vdj_data/gd-1_R2_001.fastq.gz --barcode /nethome/daniel.fonseca/vdj_data/gd-1_R1_001.fastq.gz failed: 139 at /usr/local/modules/easybuild/software/TRUST4/1.0.14-GCC-11.3.0/bin/run-trust4 line 55.

Based on the running results, it seems the ${BARCODE_LIST} is not passed to the --barcodeWhitelist option, so there is no file following the --barcodeWhitelist option in the running log. Perhaps echo the $BARCODE_LIST to see whether it is set or directly specify the folder without using a variable will help resolve the issue?
CellRanger VDJ has stringent filtering criteria, so it is expected to get fewer TCRs from the filtered outputs. Tough 20 TCR seems too few for the cellranger. Many of the 600 TCRs may from ambient cells. So if you overlap TRUST4 with Seurat/Scanpy QC-ed cell, the result will be much more accurate.

Oh, I mean those extra TCRs are from bad-quality cells. So if you just consider the TCRs from the barcodes that passed the scanpy QC, it should be good for downstream analysis.


firebase_ml_vision 0.9.2 visionText.text return empty result

Note: the cloudLabeler works find, but not text recognition.

Did you try with images in different orientations? Portrait/Landscape?
For me using flutter_image_compress solves the problem. See https://github.com/nachtmaar/flutter-meetup-munich-ocr-demo/blob/master/lib/main.dart#L93
Do you have the same problem in earlier firebase_ml_vision version too?

Did you try with images in different orientations? Portrait/Landscape?
For me using flutter_image_compress solves the problem. See https://github.com/nachtmaar/flutter-meetup-munich-ocr-demo/blob/master/lib/main.dart#L93
Do you have the same problem in earlier firebase_ml_vision version too?

@nachtmaar I don't think it's related to orientation problem since i can change the orientation by turning the document. Maybe it's related to image size and compression?

VisionText visionText = await textRecognizer.processImage(visionImage);
i think the textRecognizer not even try to process the image, it just return empty visionText.text instantly after it triggered.

@nachtmaar  i think i know why, i didn't add this

pod 'Firebase/MLVisionTextModel'

I try to use cloud text recognition and tried all four orientation, i only can get some random text.

pod 'Firebase/MLVisionTextModel'

case close~

@nachtmaar Do you have any ideas when the orientation bug will be fixed? I think the issue is related to camera plugin on specific iPhone

I don't know if it is a bug. I think firebase_ml_vision just expects the image to be in landscape mode, but this is only a guess.
My current workaround is using the flutter_image_compress plugin as described above. You can read EXIF information with exif  plugin if you think there is a EXIF bug.
See How to read exif orientation.
You could also give image_picker a try. But both for camera and image_picker I am using the workaround :/
It should be easier to use firebase_ml_vision :/

@sooxiaotong The reason why it might be specific to certain phones is probably the rotation of the camera sensor itself because width and height of the sensor are not the same.


Git action

@Trott We're testing /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/ inside the container built on https://hub.docker.com/r/mdenzo/vuln-regex-detector
Commands
docker pull mdenzo/vuln-regex-detector
docker run -it mdenzo/vuln-regex-detector
echo 'var redos=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/' > test.js
echo '{"file":"./test.js"}' > repo.json
perl ./bin/check-file.pl repo.json | jq -r '.vulnRegexes | .[]?'

I'm seeing the same thing in the Docker image, and am playing around a bit here and there to see what's up. I wonder if the detection is dependent on the version of Perl being run. (I haven't had a chance to look too closely yet, but maybe the script runs the regex itself in the Perl regex engine, and different versions of Perl are susceptible/not-susceptible to different regex problems?)

Oh, I did just determine that if I add $ to the end of the regexp, the script detects it as vulnerable. Might be a bug or limitation in the script.

Hmm, interesting. I'll try with a few more vulns and see if there's a pattern.

Another possibility is that the Docker container is resource-constrained (e.g., limited memory) and that causes the detection/validation to be less robust than it is outside of a Docker container? (Do you get different results in a full VM than you see in the Docker container?)

Summoning @davisjam for completely optional holiday commentary on this stuff if he is so inclined. (And if pinging you on December 24 for something that I haven't even looked all that closely at is Totally Not Cool, hey, sorry, please ignore, and talk to you in 2022!)

Other than the detection for /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/ everything looks identical.

Summoning @davisjam for completely optional holiday commentary on this stuff if he is so inclined.

For context, @meekdenzo is trying to create a GitHub Action that will check all the changed files in a pull request for possible ReDoS issues.

Merry Christmas - I'll look after the 26 if it's still relevant then :-)

From: Rich Trott @.>
Sent: Friday, December 24, 2021 7:51 PM
To: meekdenzo/vuln-regex-detector @.>
Cc: Davis, James C @.>; Mention @.>
Subject: Re: [meekdenzo/vuln-regex-detector] Git action (PR #1)
Summoning @davisjamhttps://github.com/davisjam for completely optional holiday commentary on this stuff if he is so inclined.
For context, @meekdenzohttps://github.com/meekdenzo is trying to create a GitHub Action that will check all the changed files in a pull request for possible ReDoS issues.
—
Reply to this email directly, view it on GitHubhttps://github.com/meekdenzo/vuln-regex-detector/pull/1#issuecomment-1000953252, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFOD3LY2D3JAOYESBL665ADUSUIQFANCNFSM5KTPN63A.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>

@Trott git show --name-only --pretty=format: returns what we are looking for locally, but we're getting different output inside github-action. Thoughts?

@Trott git show --name-only --pretty=format: returns what we are looking for locally, but we're getting different output inside github-action. Thoughts?

My first guess is you need to set fetch-depth in the checkout action. You can try setting fetch-depth to 0 to see if that helps. If it doesn't, then fetch-depth isn't the answer (or at least isn't the answer by itself). We might not want to use 0 if we can avoid it, but for just getting it going, it's fine. See https://github.com/actions/checkout for info (not much, but some) about fetch-depth and how to set it.

fetch-depth: "0" did certainly change the result: https://github.com/meekdenzo/vuln-regex-detector/runs/4671778277?check_suite_focus=true I'll dig more into it.

fetch-depth: "0" did certainly change the result: https://github.com/meekdenzo/vuln-regex-detector/runs/4671778277?check_suite_focus=true I'll dig more into it.

If the easiest/best thing to do is set fetch-depth to 0, that's OK. (If we can avoid it, even better, but I wouldn't let that prevent you from publishing something for other folks to use.)

@Trott This commit https://github.com/meekdenzo/vuln-regex-detector/commit/edeca1d4ade199b60fb66ba2490f743ea1576179 solved our initial problem. However, I've been trying to figure out a way to avoid having to run ./configure on every action with the use of this docker container https://hub.docker.com/r/mdenzo/vuln-regex-detector but I haven't had any luck

@Trott This commit edeca1d solved our initial problem. However, I've been trying to figure out a way to avoid having to run ./configure on every action with the use of this docker container https://hub.docker.com/r/mdenzo/vuln-regex-detector but I haven't had any luck

I'm not very Docker-savvy, so apologies in advance if this isn't helpful, but have you read this? https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action

docker pull mdenzo/vuln-regex-detector

@Trott This commit edeca1d solved our initial problem. However, I've been trying to figure out a way to avoid having to run ./configure on every action with the use of this docker container https://hub.docker.com/r/mdenzo/vuln-regex-detector but I haven't had any luck

I'm not very Docker-savvy, so apologies in advance if this isn't helpful, but have you read this? https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action

This is a good start, but it's slightly different from what I'm trying to achieve. To put some perspective, I would like the action to sort of use runs-on: mdenzo/vuln-regex-detector:1.0.0 instead of runs-on: ubuntu-latest . This way we'll have the vuln-regex-detector environment whatever repo calls the action is called.

This is a good start, but it's slightly different from what I'm trying to achieve. To put some perspective, I would like the action to sort of use runs-on: mdenzo/vuln-regex-detector:1.0.0 instead of runs-on: ubuntu-latest . This way we'll have the vuln-regex-detector environment whatever repo calls the action is called.

Would love to be proven wrong, but I don't think that's possible without using a self-hosted runner. I think the workflow will need to start with the GitHub image and build/install the tools needed each time.

This is a good start, but it's slightly different from what I'm trying to achieve. To put some perspective, I would like the action to sort of use runs-on: mdenzo/vuln-regex-detector:1.0.0 instead of runs-on: ubuntu-latest . This way we'll have the vuln-regex-detector environment whatever repo calls the action is called.

I would love to be proven wrong, but I don't think that's possible without using a self-hosted runner. I think the workflow will need to start with the GitHub image and build/install the tools needed each time.
About runs-on: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on About self-hosted runners: https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners

After looking into self-hosted runners, I’m now reconsidering my initial approach. Let me spend a little bit more time on it and see what else might work. Also, very open to suggestions 😃


add node_exporter config to example inventory

cc/ @StakerSpace

Thanks for tagging me in, shouldn't one node be appointed in the sample file that will be the node exporter?
Example :
[node-exporter-3:vars]

Ip address
User
...

Thanks for tagging me in, shouldn't one node be appointed in the sample file that will be the node exporter?
Example :
[node-exporter-3:vars]

Ip address
User
...

Nope node_exporter runs on each of the hosts, sentries and validators.


onChange function doesn't return the selected child element

When executiong onChange function for Select using a non native feature, it should return event and child but child element is not returning, I was debugging this by myself and I realize that onChange function that is executing belongs to a input element and not the onChange function that I passed downb to the props
I attached a screenshot to illustrate the bug

[x] This is a v1.x issue.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior
Should return event and child element selected when executing onChange
Current Behavior
only return event when executing onChange
Steps to Reproduce
Just render the select component with non native, and try using a onChange function and get the child argument
Context
I want to get the child selected to get more information than value itself when selecting a option in Select component
Your Environment

Tech
Version

Material-UI
^v1.2.1

React
^16.4.2

browser
Google Chrome Version 68.0.3440.75 (Official Build) (64-bit)  (Mac)

it should return event and child but child element is not returning

@johuder33 It's not what the documentation says:

The react element that was selected when native is false (default).

I want to get the child selected to get more information than value itself when selecting a option in Select component

Here it what I found googling the problem:
const child = event.target.options[event.target.options.selectedIndex];

@oliviertassinari sorry if I explain myself in wrong way, the docs says: function(event: object, child?: object) => void event: The event source of the callback. You can pull out the new value by accessing event.target.value.
child: The react element that was selected when native is false (default).
the dark words says that when native is false it should return the child argument, I am using the native: true, but not child element is returned

the dark words says that when native is false it should return the child argument, I am using the native: true, but not child element is returned

@johuder33 Don't worry, things will be clearer after a good night sleep :).
Should we make both API by identically? I would say no, it's pretty specific. What's your use case? Why using the DOM to access the information, why don't you use the raw data?


Generate props file with referenced fs files

It would be nice to have a props file generated. This will allow scenario:
client.fsproj: <Import Project="output/generated.props" />
/output
<generated F# files>
<project name>.props
    <ItemGroup>
        <Compile Include="Query1.fs" />
        ...
    </ItemGroup>

That looks like a doable improvement. Preferably via an option ["generateProps"]: <true | false> where false is default.
I am not sure how the props file will look like though, can you provide a full example?

The file extension can be any. Content matters.
It will be something like:
<ItemGroup>
    <Compile Include="Types.fs" />
    <Compile Include="Query1.fs" />
    <Compile Include="Query2.fs" />
    ...
    <Compile Include="QueryN.fs" />
    <Compile Include="Client.fs" />
</ItemGroup>

That is all.
The main point is to include files in the right order and do not do that manually.

Just a piece of fsproj extracted to separate file and auto-generated

I want to realize this opportunity. How to name the key that will switch generation between fsproj and props?

I would like to use StringBuffer
type StringBuffer = StringBuilder -> unit

type StringBufferBuilder () =
    member inline __.Yield (txt: string) = fun (b: StringBuilder) -> Printf.bprintf b "%s" txt
    member inline __.Yield (c: char) = fun (b: StringBuilder) -> Printf.bprintf b "%c" c
    member inline __.Yield (b: byte) = fun (sb: StringBuilder) -> Printf.bprintf sb "%02x " b
    member inline __.YieldFrom (strings: #seq<string>) =
        fun (b: StringBuilder) ->
            for s in strings do Printf.bprintf b "%s" s

    member inline __.YieldFrom (f: StringBuffer) = f
    member __.Combine (f, g) = fun (b: StringBuilder) -> f b; g b
    member __.Delay f = fun (b: StringBuilder) -> (f()) b
    member __.Zero () = ignore

    member __.For (xs: 'a seq, f: 'a -> StringBuffer) =
        fun (b: StringBuilder) ->
            use e = xs.GetEnumerator ()
            while e.MoveNext() do
                (f e.Current) b

    member __.While (p: unit -> bool, f: StringBuffer) =
        fun (b: StringBuilder) -> while p () do f b

    member __.Run (f: StringBuffer) =
        let b = StringBuilder()
        do f b
        b.ToString()

let stringBuffer = new StringBufferBuilder ()

Can I add it to the project?

I would like to generate fsproj using XDocument, XElement. Can I rewrite the generation on them?

Hi @anthony-mi maybe I didn't understand the issue correctly, does this replace the fsproj entirely? if so, what about the external dependencies that the project uses, specifically Fable.Remoting.Client?

I would like to generate fsproj using XDocument, XElement. Can I rewrite the generation on them?

That would be a nice improvement to the current API (which uses strings) to build the project file but that is a separate issue

It depends on your intent. If you want to go away from fsproj to props as I propose than we do that

But if you wan to keep the ability to have full project, then we need to introduce a switch

What is your opinion?

There is already a switch called target which takes <fable | fsharp | shared> to which we can add propsFile or just props as another type of target but the question remains, what do you do with the external dependencies that are added and used in GraphqlClient.fs?

They can be added to props also

But it is better to add them manually

To the project file

There is already a switch called target which takes <fable | fsharp | shared> to which we can add propsFile
But props can be generated for any target

They can be added to props also

So it is not just the files
<ItemGroup>
    <Compile Include="Types.fs" />
    <Compile Include="Query1.fs" />
    <Compile Include="Query2.fs" />
    ...
    <Compile Include="QueryN.fs" />
    <Compile Include="Client.fs" />
</ItemGroup>

but also with package references added
<ItemGroup>
    <Compile Include="Types.fs" />
    <Compile Include="Query1.fs" />
    <Compile Include="Query2.fs" />
    ...
    <Compile Include="QueryN.fs" />
    <Compile Include="Client.fs" />
</ItemGroup>
<ItemGroup>
    <PackageReference Update="FSharp.Core" Version="4.7.2" />
    <PackageReference Include="Fable.Remoting.Json" Version="2.14.0" />
</ItemGroup>

is that correct?

Yes we can do that. But I think that this 2 dependencies any developer can ad himself into his project as well as <Import Project="GraphQLClient.props" />

I would rather have snowflaqe decide which dependencies are used because they are tied to the code generation. If a I fix something in the serializer and update snowflaqe to a new version, they would get the new version with the proper dependency versions etc.

That's fine, developer can override it in consumption project any way

Do you approve stringBuffer and XDocument?

stringBuffer I don't mind, XDocument yes please! 🙏

Changed fsproj generation to props - everything works.

Added option createProjectFile to implement this feature thanks to @anthony-mi where the value false makes snowflaqe output a props file instead of a project (see docs in readme)


Render Markdown Articles in Articles.jsx

Get the Articles to load statically, with matching CSS

Articles are loading...
Mixing MathJax and remark gets everything to load except for the inline Latex
The React-Notebook-Viewer tool I forked can render the inline latex, figure out...

How to modify the CSS to match the themes

Fix Width of the Rendered notebook
Get Codeblocks to match the Site Theme
Make Codeblocks Squircles, add Copy Buttons

Fix the Latex rendering

Figure out if I need to just use remark-math, just katex, or a mix of the two

Oops this is just Article Cards, These work fine I just need to get some thumbnail images to add so it looks prettier


feat(nargo): Add lsp command to start server that reports no capabilities

Description

Problem*

Resolves
Summary*

This PR puts in place the scaffolding for the LSP server logic via nargo_lsp crate and then constructs a Tower stack via the lsp command in nargo_cli. The LSP currently reports no capabilities, but serves as the skeleton to prove that https://github.com/noir-lang/vscode-noir/pull/3 can communicate with it (enable tracing in the options).
The choice to use async-lsp was made because it sets out to solve a bunch of tower-lsp problems.
Documentation

[x] This PR requires documentation updates when merged.

[x] I will submit a noir-lang/docs PR.

[ ] I will request for and support Dev Rel's help in documenting this PR.

This will add an additional command to the Nargo CLI and we will need to update the docs to mention the VSCode extension that provides the LSP client.
Additional Context

PR Checklist*

[x] I have tested the changes locally.
[x] I have formatted the changes with Prettier and/or cargo fmt on default settings.

One nit: To be consistent, can you add a header in https://github.com/noir-lang/noir/blob/master/crates/readme.md with the lsp since it a new crate


Add 404 page

https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site


selectable = true does not fire onSelect callback

For some reason, when I set the options:
$scope.dtOptions = {
      selectable: true,
      multiSelect: true
}

the onSelect callback is fired, however if I disable multi-select and have just:
$scope.dtOptions = {
      selectable: true
}

the `onSelect callback never fires.  Is this by design or a bug? To me, it seems like very odd interface.

The callback fires for me but the selected object is not getting referenced correctly in the page controller.  I create a single select demo that demonstrates this but don't have to address right now.

Is this still an issue?

I am seeing the onSelect fire, however the selected row is null.  This was just because the demo shows on-select="onSelect(row)", whenshould be (based on the code) on-select="onSelect(rows)".
This is in SelectionController.js:90.
Also, when in single selection mode, the binding of selected="selected" will not work since it replaces the object.  Seems like it would be easiest to just splice this.selected for single select.  That is, having the two modes work the same seems like a good idea.


redesigning the layout

fix https://github.com/ethereum/remix/issues/102
address https://github.com/ethereum/remix/issues/114

Do you really need the PNG? Can't you use a unicode character for  that?


add Pac4j HTTPPostSimpleSignEncoder implementation on branch 3.7.x

Implementing HTTP Post Simple-Sign protocol, inspired from Pac4jHTTPPostEncoder but extending directly openSAML class HTTPPostSimpleSignEncoder.

Thanks for the PR.


Senior Full Stack Developer

DESCRIPTION
We need awesome senior full-stack engineers to build Homes.co.nz. We’re a startup with funding and revenue, and we’re building the best, most usable and data-driven property website in NZ.
About the job:
Help us build homes.co.nz, and scale it to the whole of New Zealand. Define the tech stack, and bring homes.co.nz to everyone. Homes.co.nz is pretty exciting. On the ground floor, building a tech stack with few restrictions, and doing something interesting. Lots of data, analysis and models, as well as beautiful front-ends. And something you can actually explain to your parents!
We have a microservice architecture, primarily using Go, but have components in RoR, and a front-end in Angular. And one in React. And some Python. And R... Anyway, you should be good at, and love, coding.
Responsibilities:

Develop the homes.co.nz website and API applications to make them a) beautiful, and b) scale to every house in NZ.
Own your production infrastructure end-to-end. You’ll deploy your own code multiple times a week.
Work directly with product management to define, architect, and build new features.
Write quality, maintainable code with extensive test coverage in a fast-paced professional software engineering environment.

REQUIREMENTS

5+ years building and supporting performant user-facing systems.
Expert level understanding of object oriented design and data modeling.
You have an appreciation of design-driven coding.
Ability to mentor and lead junior engineers.
Must be a DOer, a curious learner, and …
You must like to code!

Bonus points:

You’ve coded a system from front-end to database, and shown it to users. And then changed it based on what they said, and what you measured.
You know where to look when 100,000 people hit your website and it breaks, and … you know how to avoid that in the first place.

Tech we use currently: Go, Angular, AngularJS, React, Postgres, Redis, ElasticSearch, Kubernetes, Docker, AWS, GitHub
BENEFITS
Start-up culture
Ample parking and close to Petone train station
Applicants for this position should have NZ residency or a valid NZ work visa.
ref : https://homesnz.workable.com/j/AFD34328DE

This position is still hiring! Contact Megan for more information if you are interested.

Closing this job posting as the original job is no longer available.


How to achieve the training using multi-graph (each graph/mesh from an 3D medical image)?

Hi，
Thanks for your work. I'm totally a green hand of computer vision.
Recently, I'm trying to achieve the medical image segmentation using GCNs.
However, I read your code and find that the input is a whole graph, which includes the training data, test data, and validation data. However, in my framework, the training image is regarded as a graph, and there is not a connection between each image.
Thus, I'm confused about how to achieve this.
Besides, I want to know whether the input feature can be extracted patch from the target node.
Look forward to your reply.
Thanks,
lei

Maybe this is helpful: https://github.com/tkipf/gcn/issues/4


Fix report generation

Context
On QA, governingBody report generation fails due to sparql query timeout.
Proposal
Simplify the query in order to speedup the answer.

@LBONTEN I did some test and it took more than 20min to resolve the original query, multiply per 2000 governing-body, it would take forever to get the report. Moreover the vote details are not use in the final report. Let remove it for now


Future development

Hi @ryanking,
Just wondering what your plans are for this repo - due to internal requirements I have now added another 8 resources on the @viostream fork plus some enhancements and bugfixes to existing resources.
Given that I have a couple of open PRs that seem to be stalled, keen to understand if you're still planning on developing/maintaining this - if so I can work out the best way to break the remaining changes back up into sensible PRs.
Cheers!

@sjauld sorry for the lack of response. I have been on paternity leave for the last month, so I haven't been able to respond. I am doing to work through the open PRs this week.

Also - feel free do just dump a bunch of changes in one PR, I can sort through them.

Will do! And congratulations too!


Code snippets are not rendered correctly in preview mode

Does this issue occur when all extensions are disabled?:
Yes

VS Code Version:
1.74.2

OS Version:
Win 10 Enterprise, 21H2

Steps to Reproduce:
Code snippets include in our markdown files have correct coloring in editing mode while annotated as c# or csharp, but in review mode coloring is incorrect. Please see attached image.
What's the expected result
Coloring in preview mode (right side on attached image) is same as in editing mode (left side).

What you mean by language of right-hand side

I mean the file type and what's the detected/configured language. Your provided samples work fine for me, the language in use is C# (see status bar)

I think there is misunderstanding what the issue issue is. You copied that code to cs file created by you. So color is correct as VSCode know its C# cs file. However, Im not talking about cs files at all. Please download and open that md files which was attached in previous comment. VS Code will open it by default in edit mode (left side on attached image). AS you can see those code snippets are colored correctly based on definition in markdown language code snippets (backticks with language name). Thats standard markdown notation. However, when you will click "Preview" button which should show same file rendered based on markdown syntax defined in given md file. All the coloring in code snippets which is visible in editing mode is gone.

Highlighting in the markdown preview uses highlight.js. Please file an issue against them for this c# highlighting issue
Long term, this would also be addressed by #91279


Reset all world objects on spacebar, allow negative position args

Thanks, Ben!
Before I accept this, please do a couple of things:
-remove the comment from src/me/drton/jmavsim/vehicle/AbstractVehicle.java
-run fix_style.sh to make sure the formatting is right because I think there's an indentation not compliant with the style.
All this makes it easier if I later decide to submit a pull request upstream
Thanks

Made the above changes – Let me know if there are any more issues!

Thanks!


Alternative Google Drive Export

When exporting (copy, copyto, sync) Google Drive files that are too large for the API export command, the files are not exported.
This appears to me a known issue with the published Google API. It can’t seem to export files larger that 5MB, might be 10MB (or some unspecific size; Google won’t say).
https://issuetracker.google.com/issues/36761333
And this might be a better (or alternative) api call for copying from G Suite, if the file is too large. Maybe a "alt_fallback" switch in the command.
https://docs.google.com/presentation/d/FILE_ID/export/pptx
The downside is the file type has to be known. Files types are:
doc
txt
html
odt
pptx
odd
jpg
png
svg
plus some more for spreadsheets and drawings. Credit to https://www.labnol.org/internet/direct-links-for-google-drive/28356/

I was asked specifically, in 2235, to open a separate ticket for this.

Here is a beta fix for you to try
https://beta.rclone.org/v1.40-113-g0912186a-fix-2243-drive-export/ (uploaded in 15-30 mins)
This exports all the docs using those URLs you linked.
Can you test if it works please?
And also I'd like your opinion on whether rclone should use the new URLs always or whether it should be via a flag!
Thanks
PS I'm sure I posted this already - It seems to have disappeared though...

I will try on Monday. I would suggesting using the published API's as the default, then have a flag to try the alternate API if the published API fails. I'm not sure what the implications of using the unpublished API are, and therefore should probably be avoided unless necessary.
Alternatively,  use the published API by default and fall back to the unpublished API when the files failed to download, with no flag.
It all depends on the implications of using the unpublished API.

Ok, I tried with the one large Slides presentation, and it worked.

I've added a --drive-alternate-export flag to enable this.
Here is a beta with it in
https://beta.rclone.org/v1.41-042-g63f413f4/ (uploaded in 15-30 mins)
This will be in the latest beta from now on and and in v1.42

I just tried the beta, and it seems to work. One questions. When using the --drive-alternate-export flag, does it use the alternative for every download, or only when the published API fails with a  "too large" error?

@odinian it uses it for all downloads.


[DOC] Add guide for deploying on Slurm

As mentioned by Issue #751 that the given link in the current docs for using Alpa on Ray on Slurm is broken. Hence, after using Slurm for one month, I wrote this guide, hoping to add to the tutorial section of docs and help people with access of Slurm to deploy Alpa.

@ddxxdd-code please remove the echo statements in the scripts and only keep those important ones (e.g., echos that check ray is up and alpa is working fine)

Just updated all the scripts. All echos removed, except for the one before testing Ray status.

Also, please move the slurm_scripts_examples to under examples/ instead of docs/


certsum does not appear to be using SNI if given hostnames

If provided one or more hostnames it does not appear to use the hostname, but rather the resolved IP when checking certificates. This is fine if the host only has one cert, but doesn't work for multi-site systems (or sites whose https connections are terminated by a load-balancer).

Probably will need to extend the type used to track scanning so that we can determine whether a hostname was given, and if so, use it instead of the IP.

Note: The problem noted on this GH issue does not affect lscert or check_cert (afaik).

Another illustration:
go run ./cmd/certsum --hosts www.google.com --ports 443,8443 --scan-rate-limit 5 --show-valid-certs --show-hosts-with-valid-certs
Beginning cert scan against 10 unique hosts using ports: [443 8443]
......
Completed certificates scan in 412.9013ms
6 certificates (0 issues) found.

Results (all):

IP Address              Port    Subject or SANs         Status (Type)           Summary                         Serial
---                     ---     ---                     ---                     ---                             ---
<IP_ADDRESS>          443     invalid2.invalid        ✅ (root)               [OK] 2815d 12h remaining        90:76:89:18:E9:33:93:A0
<IP_ADDRESS>          443     invalid2.invalid        ✅ (root)               [OK] 2815d 12h remaining        90:76:89:18:E9:33:93:A0
<IP_ADDRESS>          443     invalid2.invalid        ✅ (root)               [OK] 2815d 12h remaining        90:76:89:18:E9:33:93:A0
<IP_ADDRESS>          443     invalid2.invalid        ✅ (root)               [OK] 2815d 12h remaining        90:76:89:18:E9:33:93:A0
<IP_ADDRESS>          443     invalid2.invalid        ✅ (root)               [OK] 2815d 12h remaining        90:76:89:18:E9:33:93:A0
<IP_ADDRESS>           443     invalid2.invalid        ✅ (root)               [OK] 2815d 12h remaining        90:76:89:18:E9:33:93:A0

SNI not working:
$ lscert --server <IP_ADDRESS>

=============================
CERTIFICATES | AGE THRESHOLDS
=============================

- WARNING:      Expires before 2022-05-17 11:51:53 +0000 UTC (30 days)
- CRITICAL:     Expires before 2022-05-02 11:51:53 +0000 UTC (15 days)

======================
CERTIFICATES | SUMMARY
======================

- OK: 1 certs found for service running on <IP_ADDRESS> at port 443
{"level":"warn","version":"check-cert v0.6.0-0-g4d945ef (https://github.com/atc0005/check-cert)","logging_level":"info","app_type":"inspecter","filename":"","server":"<IP_ADDRESS>","port":443,"cert_check_timeout":"10s","age_warning":30,"age_critical":15,"error":"x509: cannot validate certificate for <IP_ADDRESS> because it doesn't contain any IP SANs","time":"2022-04-17T06:51:53-05:00","caller":"github.com/atc0005/check-cert/cmd/lscert/main.go:150","message":"provided hostname \"<IP_ADDRESS>\" does not match server certificate"}
- OK: root cert "invalid2.invalid" expires next with 2815d 12h remaining (until 2030-01-01 00:00:00 +0000 UTC)
- OK: [EXPIRED: 0, EXPIRING: 0, OK: 1]

============================
CERTIFICATES | CHAIN DETAILS
============================

Certificate 1 of 1 (root):
        Name: CN=invalid2.invalid,OU=No SNI provided\; please fix your client.
        SANs entries: []
        Issuer: CN=invalid2.invalid,OU=No SNI provided\; please fix your client.
        Serial: 90:76:89:18:E9:33:93:A0
        Issued On: 2015-01-01 00:00:00 +0000 UTC
        Expiration: 2030-01-01 00:00:00 +0000 UTC
        Status: [OK] 2815d 12h remaining

and with SNI working:
$ lscert --server www.google.com

=============================
CERTIFICATES | AGE THRESHOLDS
=============================

- WARNING:      Expires before 2022-05-17 11:51:42 +0000 UTC (30 days)
- CRITICAL:     Expires before 2022-05-02 11:51:42 +0000 UTC (15 days)

======================
CERTIFICATES | SUMMARY
======================

- OK: 3 certs found for service running on www.google.com at port 443
- OK: Provided hostname matches discovered certificate
- OK: leaf cert "www.google.com" expires next with 63d 14h remaining (until 2022-06-20 02:26:06 +0000 UTC)
- OK: [EXPIRED: 0, EXPIRING: 0, OK: 3]

============================
CERTIFICATES | CHAIN DETAILS
============================

Certificate 1 of 3 (leaf):
        Name: CN=www.google.com
        SANs entries: [www.google.com]
        Issuer: CN=GTS CA 1C3,O=Google Trust Services LLC,C=US
        Serial: C3:15:48:2B:71:EB:2D:62:0A:00:00:00:01:3C:69:CC
        Issued On: 2022-03-28 02:26:07 +0000 UTC
        Expiration: 2022-06-20 02:26:06 +0000 UTC
        Status: [OK] 63d 14h remaining

Certificate 2 of 3 (intermediate):
        Name: CN=GTS CA 1C3,O=Google Trust Services LLC,C=US
        SANs entries: []
        Issuer: CN=GTS Root R1,O=Google Trust Services LLC,C=US
        Serial: 02:03:BC:53:59:6B:34:C7:18:F5:01:50:66
        Issued On: 2020-08-13 00:00:42 +0000 UTC
        Expiration: 2027-09-30 00:00:42 +0000 UTC
        Status: [OK] 1991d 12h remaining

Certificate 3 of 3 (intermediate):
        Name: CN=GTS Root R1,O=Google Trust Services LLC,C=US
        SANs entries: []
        Issuer: CN=GlobalSign Root CA,OU=Root CA,O=GlobalSign nv-sa,C=BE
        Serial: 77:BD:0D:6C:DB:36:F9:1A:EA:21:0F:C4:F0:58:D3:0D
        Issued On: 2020-06-19 00:00:42 +0000 UTC
        Expiration: 2028-01-28 00:00:42 +0000 UTC
        Status: [OK] 2111d 12h remaining


Frontend assets deploy is throwing errors

running: sls client deploy --no-delete-contents
throws this error
  Serverless Error ---------------------------------------
  Serverless command "client" not found. Did you mean "list"? Run "serverless help" for a list of all available commands.

I think serverless-finch is missing, however, it is missing some config and the /dist folder so I'm not sure

Serverless-finch is not included, as it is not required, because all assets - css and js files are served by lambda function. After you install serverless-finch, this command should work.

sorry for the late response. however, I've installed serverless-finch but it required client/dist and index.html... any help with that!?

@NagyWesley Please, read the documentation for serverless-finch. You need to specify destinationFolder as shown below:
custom:   client:       distributionFolder: public


Pass token on query string / allow passing custom getToken function

It would be nice to allow passing the token on the query string (?token=....) instead of having to passing it as a request header.  express-jwt permits this by allowing you to pass a custom getToken function like so:
app.use(jwt({
  secret: 'hello world !',
  credentialsRequired: false,
  getToken: function fromHeaderOrQuerystring (req) {
    if (req.headers.authorization && req.headers.authorization.split(' ')[0] === 'Bearer') {
        return req.headers.authorization.split(' ')[1];
    } else if (req.query && req.query.token) {
      return req.query.token;
    }
    return null;
  }
}));

PR 28 (https://github.com/stiang/koa-jwt/pull/28) seems to be addressing this also.

I agree that this would be nice. As I just said in a comment on the existing PR: Any chance of a getToken PR with tests? Will merge :)

Is this still in the works? I submitted a PR but haven't gotten feedback yet ¯_(ツ)_/¯

@danwkennedy Sorry about that, will try to get it merged in the next couple of days! Thanks for the PR :)

+1 on this. I'm also waiting for this to be merged.

Thanks for the reminder, @nfantone :) I‘ve merged it and published 1.2.0.
Thanks for the contribution, @danwkennedy!

Thanks to you, @stiang!

Now that I'm paying attention to the actual implementation, would it be nice(r) if the getToken function didn't replace the entire plugin functionality? Instead, we could be using that as an alternative method for fetching the token.
Let's say I wanted to get the JWT from a query string (which was the initial intent of the PR), but I'd also like to default to Authorization header if not found. For that to be possible, I'd have to write code that checks the query string, but also duplicate the bit about the header which is already present in koa-jwt (including format validation).
So instead of this,
  if (opts.getToken) {
      token = opts.getToken.call(this);
    } else if (opts.cookie && this.cookies.get(opts.cookie)) {
      // ...
 }

with chained else ifs, maybe change it to something like this?
  if (opts.getToken) {
   token = opts.getToken.call(this);
  }

if (!token) {
  if (opts.cookie && this.cookies.get(opts.cookie)) {
      // ...
   }
}

That way, if getFunction failed to acquire the token, the other implemented methods would kick in. Of course, we would have to document the fact that some mechanisms are always checked by default.

@danwkennedy and @stiang Thoughts ^?

Would you think it'd be useful to make the getToken option accept an array of functions with the first non-null value being the winner?

@danwkennedy How would an array of functions help here, exactly?
Are you thinking of something along the lines of:
function getTokenFromCookie() { /* ... */ };
function getTokenFromHeader() { /* ... */ };
function getTokenFromParam() { /* ... */ };
var getTokenFns = [getTokenFromCookie, getTokenFromHeader, getTokenFromParam];

app.use(jwt({
  secret: 'hello world !',
  credentialsRequired: false,
  getToken: getTokenFns
}));

If so, I'm not entirely sold on it. This is adding extra complexity for something rather simple. But it may be just my impression.

It might be useful if getToken would accept that array as well as the function form.

@nfantone I would probably do that internally no matter what. The question is whether that functionality should be available to users. I too was thinking the array | function option would be the way to go. However I'm worried the array could potentially impact performance. If we're ok raising that as a concern in the docs and letting users hang themselves if they want, that's a possibility.

@nfantone I have an initial implementation for that here:
https://github.com/danwkennedy/jwt/commit/ba4121d090bf2b35bd8791e2e6c1c76813bf06f5
That will just make everything fall through until a token is returned or else an error is thrown. The getToken option just gets unshifted on the list of resolvers so it runs first.

@danwkennedy I like it! Up por for a new PR? Let's have @stiang review it.

👍 I'll write up some documentation on that functionality.
What about making the getToken option accept an array or a function?

That would be nice... but a feature not sure it would have much usage. Either way, it won't hurt if it's there.

I'm gonna leave it. You could do something similar inside of the getToken function (i.e. check this or check that)

https://github.com/koajs/jwt/pull/39 is created
@nfantone, @stiang


Dat support

requires dat on the CLI
output looks like this:
INFO Changed to directory '/Users/max/src/sibyl/bundles/dat-2045e55542fd800f5b9aec6fb6ffa0e257a4a444f48023cec3cf499f0d9c4c8e-668956be3f'
INFO Fetching scheme 'dat' with path '2045e55542fd800f5b9aec6fb6ffa0e257a4a444f48023cec3cf499f0d9c4c8e'
INFO Fetching Dat repo '2045e55542fd800f5b9aec6fb6ffa0e257a4a444f48023cec3cf499f0d9c4c8e{normal}''
INFO Running 'dat 2045e55542fd800f5b9aec6fb6ffa0e257a4a444f48023cec3cf499f0d9c4c8e . --exit{normal}''
Connecting to dat network...
dat v13.6.0
Created new dat in /Users/max/src/sibyl/bundles/dat-2045e55542fd800f5b9aec6fb6ffa0e257a4a444f48023cec3cf499f0d9c4c8e-668956be3f/.dat
Cloning: 2 files (8 B)
2 connections | Download 146 B/s Upload 0 B/s
dat sync complete.
Version 2
Exiting the Dat program...
INFO Building image: 'stencila/bundles/dat-2045e55542fd800f5b9aec6fb6ffa0e257a4a444f48023cec3cf499f0d9c4c8e-668956be3f:1169538874db8141e53d0a7bb973c3da57e33274'
    Sending build context to Docker daemon 24.06 kB
    Step 1/2 : FROM stencila/iota
     ---> bdb549ee9bbf
    Step 2/2 : COPY . .
     ---> 4936217afd4f
    Removing intermediate container f3712aa53fb7
    Successfully built 4936217afd4f
INFO Launching container name:bundle-8854 port:1032
    1ec2c37c26836c40f8f1cb573a832263b1c0effa06322d3971845be892e4ae17

Codecov Report

Merging #29 into master will decrease coverage by 2.05%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
- Coverage   87.34%   85.29%   -2.06%
==========================================
  Files           1        1
  Lines         166      170       +4
==========================================
  Hits          145      145
- Misses         21       25       +4

Impacted Files
Coverage Δ

sibyl.sh
85.29% <28.57%> (-2.06%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0eea144...2b9e704. Read the comment docs.