« first day (2745 days earlier)      last day (2201 days later) » 

12:18 AM
@BenFortune how does your client handle rate limiting?
 
It doesn't atm
 
hmm what's this
warhammer vermintide 2 :o
 
@Loktar I'd play D3 with you any day
I still have it its fun
 
hm, which Rx operator queues up items and releases them at a set interval?
 
@ssube example?
 
12:26 AM
spacing out a burst of incoming items
 
ah
probably throttle
though I assume you looked that up
 
throttle and debounce both ignore some values
I want them to queue up
maybe delay and an interval
 
This movie was way better than I thought - youtube.com/watch?v=dpPy3sIxbmA
 
I know
zip and interval
 
[a, b, c] into zip(interval) will be... [a, 1, b, 2, c, 3], won't it?
oh, it calculates. I don't care about the interval, so I'm not sure I need that
 
12:33 AM
you can zip a slow interval
with whatever observable you are trying to throttle
then every value from that observable will only be emitted every time the slow interval fires
like this
you get the value at the same index from each, but limited to once every 2 seconds by the slower interval
 
I see
 
hey, can i stub something like npmjs.com/package/opener?
or spy using sinon
 
inject it to wherever you use it
so you can inject a stub instead for testing
 
@TapasweniPathak what?
Oh stub the module itself
sure,
 
sorry that was not a good question. in my code i'm at the end create a link to opener using opener(${start}${perClusterInstanceType}${instanceIds}${end});
i was thinking about ways to test it
 
12:42 AM
Just hijack opener
Its javascript ;)
 
don't
 
so i printed what opener returned me if i can assert on that
haha :D
 
use injection
 
So use injection to hijack opener?
 
how is it hijacking if it's injected
you just inject the mock
 
12:43 AM
spawnargs:
   [ 'open',
     'http://something-something-link.something' ]
 
I think of that as hijack, your code thought it was going to open things now its asserting. But thanks @Mosho 😀 I'll take your word for testing.
 
i'm thinking to stub it in a way that i will assert on this argument of opener
 
@ShrekOverflow my code was expecting an interface and it got that interface
 
@Mosho do you have any example of what you mean here?
 
it doesn't care what it does
that's how good code works
 
12:44 AM
So we are both saying the same thing, my nomenclature was wrong?
 
well, if that's what you meant
 
Yeah, I am not so caught up on engineering stuff
 
hijacking sounds like overwriting global.require :P
 
I can definitely sell inject to you though.
@Mosho Oh yeah not that, never do that
 
@TapasweniPathak if your usage is
const opener = require('opener');
const foo = () => opener('something');
foo()
instead do
const openerModule = require('opener');
const foo = (opener) => opener('something');
foo(openerModule);
maybe a little too simplistic
 
12:47 AM
or module.exports.opener = opener?
 
not sure what you mean
basically you wrap your code in a function/class
 
@BenFortune it's not quite pinned down yet, but I refactored everything to match my note-arch and it works: github.com/ssube/isolex/tree/master/src
 
and pass whatever your code uses (modules, other functions that may need to be swapped) as parameters to the function/class constructor.
 
i have a method in which i do some processing of data and produce a link based on that output in the end i create a opener link and do a opener(link) call. i'm looking for a way through which i can test this
 
you can do what I said
 
12:49 AM
i get you but not completely @Mosho
 
if you can provide your code in a fiddle I'll edit it to show what I mean
 
@Neoares By that he means slow.
 
i have stubbed all, one way is have the url produced in a variable and assert on that, no stubbing opener
but i want to included opener too
 
@TapasweniPathak and run is what you're testing?
 
benchmarksgame-team.pages.debian.net/benchmarksgame/compare/… This makes sense (I am waiting on a python script to finish for past 54 minutes and it is doing number crunching)
 
12:55 AM
yeah
@Mosho
 
basically like that
you can do something like
module.exports.run = (opener = openerModule) => cli => {...
as well
then in your test you pass the mock opener to the function
better dependency injection in general would be to require opener somewhere else, and then pass it to run wherever needed
so that run isn't coupled to opener
 
there is something more to it, this is an extension of exisiting project, so here inside module.exports.run(cli, context) i can only have these two parameters and nothing else
 
but that's not needed for what you're trying to do
 
In node.js how do you print the entire REPL history?
 
@TapasweniPathak well, you're going to have to edit it
to do that
you can play with require itself, but that's bad
real bad
 
12:58 AM
i can't. i can only have these two that's it.
that's not the expected behavior that run would have anything other than these two parameters
 
well
no one would notice if it was run(cli, context, opener)
with the default opener
 
once i stubbed opener like
 
I guess that might not be true
 
 const opener = sinon.stub(index, 'opener').returns({
    unref: () => Promise.resolve(),
    stdin: {
      unref: () => Promise.resolve()
    },
    stdout: {
      unref: () => Promise.resolve()
    },
    stderr: {
      unref: () => Promise.resolve()
    }
  });
 
depending on the code that uses it
 
1:00 AM
index was my file and module.export.opener = opener inside it
but here the case is different
 
yeah you can do something like that too
 
yeah no one would notice but this would also be not the right tests
 
but it's clunkier
 
as this would never happen
so there are three ways then
1. pass opener in run and stub: wrong test as this would never happen
2. is to have something like module.exports.opener and stub like how i showed: can do, should don't know
3. play with require => how to do this?
 
don't do it
 
1:04 AM
oh
so ideal way is to how you said we do generally in JS?
 
yes
 
cool thanks
@Mosho i'm just curious here do you have any links or reads about require one?
 
I can google some
but so can you
 
1:20 AM
i know this could be the reply, hehe but i always feel people who have spent more time with a language than me would have better reads. i randomly searched hijack require, stub require but didn't find any specific reads about the point you want to make, so was thinking if you have few, nvm..
 
I'm implementing a single sign on system and needed some suggestions on the architecture. When going from App A (where the user is signed into) to App B, A would create a jwt token (user name, expire date) and save its hash in a shared server-side storage space (like Redis for example). It would then go to App B and send the jwt token to it.
Then B will verify the hash of the token and check if it is matches the one that's in the DB. If it is, then it can be trusted and we can check if it expired, otherwise it was modified.
Does this sound like a valid and secure approach?
 
if you make an endpoint on A that can verify hashes, you don't need shared storage
there's a very good chance you already have that code
 
What does "endpoint on A that can verify hashes" mean?
 
rather than have A write the hash to redis, add /hash/verify to A and have B call it
loose coupling is de wey
 
So When B sends back the hash to A, A again generates the original token and its hash and then compares it with B's request?
 
1:27 AM
You shouldn't need to generate it again, A should be able to verify any JWT it issued.
 
If B is sending a hash back, A also needs a hash to compare with B's hash, right? Where does A's hash come from?
 
the JWT?
 
Yes, but where is that JWT coming from if we didn't store that token anywhere? Are we executing the same JWT-generation code again?
 
No, when the user sends their token to B (after getting one from A), then B can call over to A and verify the tokens before trusting them.
Thus removing the need for shared storage
 
It's not a strict OAuth approach. We don't really have the user getting tokens from each app. Instead, the user signs into one app, clicks on the "Take me to App B" link and goes into App B signed in.
 
1:36 AM
using the token from A, right?
 
yes, if they are inside app A and they click the link to App B, A generates a token and redirects to App B's verification endpoint along with the token
im just not understanding how A verifies the token when B sends it back to them
A no longer has access to the original token it issued unless it puts it in some sort of database
 
you don't need to store a JWT to verify it later
 
So when B comes back to verify the token, what does A compare B's token against?
 
what do you mean? A decrypts the JWT, checks the user and expiration, and gives B a trusted/not answer.
 
I'm guessing https/SSL would prevent the possible man-in-the-middle vulnerabilities here?
 
1:49 AM
@DemCodeLines What are you trying to do ?
 
proper use of JWT does that, but you want https/tls anyway.
 
HTTPS is an important part, but the JWT is also encrypted by A
 
JWT isn't encrypted its signed
you can add encrypted payloads
 
I think if you look at what a JWT is and stores, it will make more sense
 
@DemCodeLines Gimme a sec 😀 (This is my day job)
@DemCodeLines JWTs were created to validate claims in independent systems
what is your current IdP ?
 
1:54 AM
"Server/Service A" :P
 
someone code react?
 
reacts violently
 
hm, using a Map here is breaking templates :(
 
@DemCodeLines if you don't have an IdP just add OIDC support in your ServerA/ServiceA
Most environments have implementations anyway 😛 then you don't need to worry about the protocol and tons of attacks that can open up
 
0
Q: Update of states only work in a single order or sense

Pedro Miguel Pimienta MoralesI'm trying to develop a web app using React Js, but I've run into an inconvenience, which I do not understand why it happens. What is enclosed in the red colored rectangle is a component, and what is enclosed with the green color is another. I perform the following procedure, in order to execu...

 
2:02 AM
@DemCodeLines if you are calling your service that issued JWT just to validate the JWT you are doing it wrong.
 
2:16 AM
rlemon do you make maple syrup from scratch
 
do you make whatever slime your people eat from scratch?
 
american's only eat fast food
and are overweight
 
@William not really
 
in general they have both extemes
 
2:23 AM
these things are stupid expensive.
we'll see how it works.
 
it's jsut activated charcoal in a filter, right?
 
I'm unsure if the lid will hold on
yea
charcoal and filter floss
but the form factor is the part I'm worried about. the bio cube is a all in on fish tank
 
You can just buy that filter material in rolls, too, but I like the thing you made.
 
so the filters are specific
 
are the holes small enough?
 
2:25 AM
yea they're smaller on the original filter
 
@ShrekOverflow there isn't any existing idp implementation we're using
just need to build a way to go back and forth between a and b
 
@DemCodeLines that is exactly what OpenID Connect / Saml do
 
obviously a secure way
 
@DemCodeLines I work for Auth0 and we solve this exact problem for most of our customers, I am not going to shove Auth0 into you 😛 but I fully understand what you are trying to do, and its a deceptively annoying problem. Ideally you should be able to just send a JWT to other client since JWTs are Signed you can just trust the JWT directly. With a short enough time window this itself should solve your problem.
 
Why is 1 pack 12 but 3 pack 72
 
2:28 AM
@Luggage the filter is built into the back
the white pad in there is the filter.
 
at this point, we can't go with saml/openId/OAuth/anything else. It's just how it is, so the only choice is to build something here that's simple and secure (even if it's only designed for the current situation)
 
so mine needs to fit the same thing
 
hope you don't kill the fish with your invention
 
there is almost zero risk of that
 
@DemCodeLines You are literally building one of them
 
2:29 AM
explodes
 
RIP FISHIES :(
 
> Build time: 6 hours 13 minutes
Filament length: 35806.8 mm
Plastic weight: 107.66 g (0.24 lb)
Material cost: 1.94
if it doesn't work I'm out $2
 
Should work..
 
@ShrekOverflow I totally understand, we are duplicating one of them instead of just using them. But, it is what it is and we have to work with the situation (can't change it at the time).
 
@DemCodeLines What I am saying is what stops you from just using the OpenID Spec?
As in, just use something like abc-js (not real name)
 
2:33 AM
@Luggage if it does I'll save like .. $150 or so a year.
 
which handles the protocol parts for you
 
printer keeps paying for itself
 
so you just tell it if A has an existing session
 
You're asking why are we not setting up a dedicated server for handling user authentication and tokens?
 
@DemCodeLines No I am asking what is wrong with just adding the OpenID Connect endpoints in your Server A
Obviously it'll only work from A -> B
 
2:37 AM
So we're communicating with a third party server for authentication? Or the "abc-js" file is the middle man who routes requests?
 
NO
@DemCodeLines Mind hopping on a quick call? What I am trying to say is just us an out of the box implemnetation A such that it simply brokers the tokens etc to B if there is a session on A
you don't even have to implement hte entire OpenID Connect spec for that
 
user2620028
@shrek why don't you go play outside like the normal kids once in a while man
 
@HatterisMad What is that about ?
 
user2620028
swing in the dark
 
2:42 AM
@HatterisMad but why ?
I fail to see that context here
 
user2620028
@ShrekOverflow i didn't read all of the text above and thought you were spending your free time having fun doing another research study on a piece of tech
 
@HatterisMad OpenIDConnect is literally hardcoded in my head now >_> don't need more research on that topic
and I hate people near me IRL, the culture around me so I simply avoid it unless absolutely necessary
 
user2620028
i was just being annoying, you can disregard
 
3:00 AM
How does tampermonkey has GM_xmlHttpRequest, that allow setting user-agent header, and whereas browser does not allow any such headers, and output error, cannot set unsafe header.
 
@SurajJain Because the browser gives different permissions to webpage code and extension code
 
@KendallFrey so you mean, GM_xmlHttpRequest would be using stackoverflow.com/a/27836989/5473170 this internally?
 
I can't say much about what they do internally, I just know both end up creating an HTTP request
 
I need to send a request to google, and I want response that the page response when the client have no javascript.
I mean suppose you search something on google.
If you turn off javascript page look very different, I want that kind of response body
so I was trying to set the header to googlebot
but that I cannot, how to do it otherwise
?
 
3:06 AM
I will look into it
 
nice, download from steam at 26mb/s
 
Also one thing, how does the page change so much with javascript off
 
shit, 32
35 :O
40 :OOOOOO
is it just rising because it sees how much pleasure it gives me
7
 
I mean without javascript, results were in li
and with javascript they were in div and whatnot
 
@ShrekOverflow "out of the box implemnetation A such that it simply brokers the tokens etc to B if there is a session on A"
 
3:08 AM
if that was happening client side, why does using xmlhttprequest also get me same body
 
Is that a concept that you're saying should be implemented? Or something else?
 
I mean I am unable to phrase my question correctly
 
@DemCodeLines I am saying there most likely there will be a compatible implementation for it for your server A. So you use that implementation like on your server A.
 
Like some sort of third-party library and helps set up the routes/tokens/etc.?
 
> make america great britain again
 
3:20 AM
@DemCodeLines yes
 
@Mosho add me on steam
 
who are you
 
 
2 hours later…
5:05 AM
@BenFortune so I added retry for rate limiting, user filtering (ban), and yaml input. The config now looks like: github.com/ssube/isolex/blob/master/config/isolex.yml
fleshing out my plans for sqlite (bookshelf or similar) and template (handlebars is in, only used in one place)
 
5:31 AM
hello
 
5:44 AM
import * as Express from 'express';

export const router = Express.Router();
> type of variable router could not be named
Why this?
 
user9644880
6:14 AM
Please help me on this
 
user9644880
0
Q: TypeError: $.ajax is not a function with jquery 3.2.1

moyen<!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> </head> <body> <!--Navigation bar--> <div id="nav-placeholder"> </div> <div id="carousel"> </div> <div id="successfulModal"> </div> <script> $(function(){ $("#nav-placeholder").load("newnavbar.htm...

 
I am getting network request failed error in react native fetch request in android virtual device connecting to localhost. any idea how to fix it? google is not helping much
 
6:48 AM
@masud_moni A quick google search for what localhost means would be super helpful
like THIS is the first result
340
Q: How to connect to my http://localhost web server from Android Emulator in Eclipse

Fopa Léon ConstantinWhat can I do in Eclipse's Android emulator to connect it to my localhost web server page at http://localhost or http://127.0.0.1? I've tried it, but the emulator still takes my request like a Google search for localhost or worse it says that it didn't found the page while my web server is norma...

 
8:06 AM
TIL what 'Zettai ryouiki' is
 
8:20 AM
@ssube That looks awesome
 
8:56 AM
Anyone here from Norway?
 
9:25 AM
@BenjaminGruenbaum depends what you need, if you need me to be from Norway I can set up a VPN and at least pretend :P
 
@KamilSolecki I want advice about booking a fjord cruise :P
 
ive been on one tho
by MSc cruises
@ssube do you have spotify
cause I just found something
weirdly it's not on YT
 
 
1 hour later…
10:58 AM
How was it @KamilSolecki? Would love some advice
 
11:30 AM
@BenjaminGruenbaum While I'm not a great fan of cruises as a form of tourism, it was really nice. The fjords (and whole Norway really) is a one of a kind landscape, and it's a pretty freaking magnificent sight
 
@KamilSolecki it would be my second cruise ever and I'm doing it for the nature rather than for the luxury
 
yeah, then yes
Sadly it was like 4 years ago, so I can't recommend you much as for places to go see
I don't remember the names :P
 
Was the ship good? Would you in retrospect opt for a smaller or bigger ship?
 
ideally, a sailboat
I'm a sucker for sailboats
But yeah, as for a cruise ship it was all good
 
Don't have a skipper's license yet
 
11:40 AM
mine doesn't allow deep into oceans and deep into seas
I don't recall what the actual number is
@KendallFrey
 
12:16 PM
Using arch be like
 
@KamilSolecki I don't, we're a google music house
 
Today is the day I’m probably buying my motorcycle
Only for it to sit in my garage for a week so I can get my permit
 
Must be torture
 
I’ve made it this long without, what’s one more week?
 
@BenFortune I should play with Arch someday
 
12:25 PM
Arch is <3
 
This bike is too great to pass up on though
 
What bike?
 
2003 Honda Shadow 600
Perfect beginner bike, in my opinion
 
Damn that's nice
 
12:27 PM
@MadaraUchiha It's nice for a personal OS, wouldn't dream of using it for work though
 
@BenFortune Yeah, that's a bit too badass for me :D
Have you tried it with dual boot?
Also, dare I ask how well it works on laptops?
 
Nah, it's just the main on my laptop
It runs really well, I'm using it with gnome
I'd recommend Manjaro if you want to try it, they have an "architect" installer, meaning you can personalise pretty much everything
 
the deepin desktop manager for arch is pretty
 
It runs like shit though, and is full of bugs
 
otherwise Budgie with the materia plugin looks nice as well
 
12:32 PM
Budgie is also slow :P
 
;_;
 
@BenFortune I'm kinda on the fence with gnome
Maybe I haven't had enough time with it, but I felt like Unity was more comfortable.
 
gnome doesn't really do much for you
 
Might try KDE
 
it's very bare bones except when it comes to widgets and themeing, then they go too far
I ran KDE for years, would never go back. KDE and Unity are about on par for worst WM ever.
if you want slow, though, KDE is choice
 
12:35 PM
I keep trying to use i3/awesome but I just can't get used to the tiling
And I suck for remembering keybinds
 
yeah, i3/awesome never appealed. WindowGrid was nice on windows, but magnetic edges work well enough.
 
real men just use the tty. no window/desktop managers
 
I think mint did well with cinnamon
 
new vape?
:P
 
lmao
You know what, I bet that'd be nice
 
12:39 PM
probably.
not every day
but sometimes
 
it is in drinks :)
 
I'll call it cinnamint
@ssube Is your bot running?
 
cinn-a-minute
 
Hello
 
it is, yeah
I just finished pulling out a base parser class
 
12:44 PM
I work with angularjs ui this statements works well var app = angular.module("app",['ui.router']); but If I change it to angular.module('app',['ui.router','ngAnimate', 'ngSanitize', 'ui.bootstrap']) ui-srefs don't work
 
Man your code is so clean and easy to understand
 
Does anybody know D3 JS?
 
@Ganesh Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Okay.
 
My working code   var app = angular.module("app",['ui.router']);
 
12:46 PM
If anybody knows D3.js, please check out this question

https://stackoverflow.com/questions/49963422/getting-tree-without-style-in-reactjs-using-d3?noredirect=1#comment86942886_49963422
 
problem when code be  var app=  angular.module('app',['ui.router','ngAnimate', 'ngSanitize', 'ui.bootstrap']);
 
@KamilSolecki You like trap?
 
I listen to a ton of shit, but trap is mostly not my thing. With exceptions
 
I just love bassy music
 
12:50 PM
the one I posted tho, thats some next level C2C like shit
 
I like that song, reminds me of the Beetroots and friends
 
the whole album is fire
 
when it comes to trap lately, this has been one of my favorite songs: youtube.com/watch?v=ltQRZ8QSskM
closely related and just a great song (definitely posted this before, but not in a while): youtube.com/watch?v=oLaE1Zm6Cms
 
oh the drop
 
Not trap but I've posted this like a million times, youtube.com/watch?v=YQbjisWixoU
 
12:55 PM
hip hop time: youtube.com/…
 
I discovered them quite recently but they do deliver well
 
I have some good old stuff in here if you like trap, youtube.com/playlist?list=PLUacTMbNmcB4LWAcbzJXkoTAiUzBjggsV
 
dat my little YT hiphop collection
mostly not well known things
 

« first day (2745 days earlier)      last day (2201 days later) »