Better HN
topnewbestaskshowjobs
Log inSign up

9034725985

53 karma · joined Jan 2, 2018 (8y ago) · 25 submissions

message me on signal or WhatsApp
Submissions

comment 1y ago · link · parent

There is a similar one:

https://aka.ms/nohello

which redirects(?) to

https://sbmueller.github.io/nohello/

comment 3y ago · link · parent

I use

<meta http-equiv="refresh" content="300"> to do speed test from fast.com

see:

view-source:https://angularten.github.io/

comment 3y ago · link · parent

What would it take to formally increase this limit to USD 250 million for everyone?

comment 3y ago · link · parent

Thank you. That gives me a red underline under ContactId and Email now. I think because input.Contact__c and input.ContactEmail__c are unknown. I think this is the right direction. What is my next step?

    const myOutput: Output = {
        ContactId: input.Contact__c,
        Email: input.ContactEmail__c,
        IsInternalUpdate: true,
        Preferences: mypreferences
    }
(property) Output.ContactId: string Type 'unknown' is not assignable to type 'string'.ts(2322) Output.ts(4, 5): The expected type comes from property 'ContactId' which is declared here on type 'Output'

comment 3y ago · link · parent

If I set input as Object,

    if (input[prefCode] !== null) {
        currentValue = input[prefCode].toString();
    }
in the lines above, I see a red underline under input[prefCode]

> Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.ts(7053)

comment 3y ago · link · parent

yes, input is a json of some kind.

You could say technically could be simply { "Unsubscribe__c": false } or even {} both of which are silly in my case because there is no key for me to identify who the person is but they are valid inputs.

Or the test case I have is https://github.com/kusl/salesforcecontactmapper/blob/eff0b3e...

Or the input could have a thousand key values and I only care about some of them. What should my object look like? How do I create a class that says everything that ends in "__c" is something I care about? I tried unknown. I tried Object. How do I fix this (and learn something so I fix all future code I write)?

comment 3y ago · link · parent

> With the ‘unknown’ type available is there a good case for ‘any’ anymore?

Lets say you have some input json that you want to slightly modify to something else. How would you do this with unknown? I can't just blindly replace any with unknown. I'd get errors like this: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type 'unknown'.ts(2407) For example, how can I do this better?

Remember the input json could be pretty much anything. I don't have a spec other than I only care about things that end with __c.

https://github.com/kusl/salesforcecontactmapper/blob/eff0b3e...

    import { Output } from "./Output";
    import { Preference } from "./Preference";

    export function MyMap(input: unknown): Output {
        const mypreferences = Array<Preference>();
        for (const prefCode in input) {
            if (prefCode.endsWith("__c")) {
                if (prefCode === "IsInternalUpdate__c") {
                    continue;
                }
                let currentValue = "";
                if (input[prefCode] !== null) {
                    currentValue = input[prefCode].toString();
                }
                if (currentValue === "true") {
                    currentValue = "True";
                }
                if (currentValue === "false") {
                    currentValue = "False";
                }
                const preference: Preference = {
                    PrefCode: prefCode,
                    CurrentValue: currentValue
                }
                mypreferences.push(preference);
            }
        }
        const myOutput: Output = {
            ContactId: input.Contact__c,
            Email: input.ContactEmail__c,
            IsInternalUpdate: true,
            Preferences: mypreferences
        }
        return myOutput;
    }

comment 3y ago · link · parent

What if there were a service where anyone can opt in to share their own location information? If there was a way to get across the hurdle of how does the service provider know if the person is indeed who they claim to be…

My thought is something like a phone number, email address, or domain name bypasses this problem. It is fairly trivial to verify you have access to a phone number, email address, domain name. Feels like this is one of those chicken and egg problems though. Why would anyone list their location at my service if nobody queries it and why would anyone query my service if nobody lists their information with me?

comment 3y ago · link · parent

> It just turns out that delegating trust to root CAs, CAs, and browser/OS vendors (the latter via built-in certificate lists) makes it easy for the end user.

This flexibility is what allowed let’s encrypt to bootstrap, right?

comment 4y ago · link · parent

I can see it being useful to type and chat between each other if we aren’t seated together on a plane.

comment 5y ago · link · parent

Personally, I don’t mind giving them my phone number because my number is already public information. It sucks though that I can’t get tweets by text.

This was the original use case of twitter. I understand SMS is not secure enough to publish tweets but why can we no longer get texts when someone tweets?

comment 7y ago · link · parent

No support for Android (yet). Install this Facebook container [1] on the desktop.

A request: I run Firefox nightly [2] as my main browser and would like to request everyone to consider using a pre-release version of Firefox if possible. It helps us make the argument that Mozilla should not run experiments in Firefox stable.

[1] https://addons.mozilla.org/en-US/firefox/addon/facebook-cont...

[2] https://www.mozilla.org/en-US/firefox/channel/desktop/

comment 7y ago · link · parent

I think he linked it so new readers can see the older comments and get clued in to the conversation. (:

I remember reading In the beginning was the command line back in high school. I liked the comparison with cars. I'm a little sad I never got to use the BeOS that the author so much likens to a batmobile (going from memory). This article even has its own Wikipedia article https://en.wikipedia.org/wiki/In_the_Beginning..._Was_the_Co...

For new readers, I'd also strongly recommend "Mother Earth Mother Board" by the same author, Neal Stephenson. In Mother Earth Mother Board, the author writes about the fiber optic cables that connect us across continents.

Original: https://www.wired.com/1996/12/ffglass/

Previously discussed https://news.ycombinator.com/item?id=15635028

https://news.ycombinator.com/item?id=8242682

comment 7y ago · link · parent

(not a Red Hat employee)

My understanding is that many, if not most, operations should not require sudo as of version 1.0.

For example, try the commands at https://github.com/containers/libpod/blob/master/docs/tutori...

comment 8y ago · link · parent

I think their servers.

(This is my imagination and it might be completely wrong so please feel free to correct me)

they mentioned spam problem which leads me to believe that if enabled, the sending client will encrypt the whole message using the recipient's public key and put all metadata other than recipient's identifier inside this bigger encrypted envelope. The receiver opens this envelope with its key and opens the smaller box inside which contains the sender's metadata.

What we lose now with this is the server does not have much insight into who is sending messages (by design). This means if you allow sealed sender from everyone, someone could send you a lot of messages which you may not like.

comment 8y ago · link · parent

You know that because it is a recent tweet.

Now imagine someone deletes all their old tweets programmatically. Several people have screenshots of an "old" tweet as they allegedly saw and "saved". Who do you believe?

https://screenshotscdn.firefoxusercontent.com/images/22ea282...

comment 8y ago · link · parent

> Other decisions such as Pocket

I am amazed that Mozilla has not yet released Pocket as free and open source software. What's going on?

comment 8y ago · link · parent

Not that long ago. I use it on my Nexus 6 (shamu) but I also use yalp to get apps from the play store.

Here is a relevant discussion: https://news.ycombinator.com/item?id=15617615

comment 8y ago · link · parent

I would like to know what the goal for auto devops is...

Will it be able to look at a project and compile it? For example: https://gitlab.com/postgres/postgres/-/jobs

comment 8y ago · link · parent

I was hoping we could use old phones as IP cameras with the screen turned off. I hope apps that are last in the foreground can continue to access camera and microphone and sensors with the screen turned off -- at least when connected to power.

comment 8y ago · link · parent

> I suspect will happen is that people will be able to leave dead-end jobs that are stressful and provide little to no value to them. Which in turn might crash the economy, because while not having the next Juicero isn't that big of a deal, not having anyone picking up the garbage on time is a real issue. Or, it might end up with employers offering a fair salary that fairly redistributes the gains in productivity afforded by modern civilization (I almost wrote this with a straight face). In any case, UBI is not just a money redistribution scheme, it's also a power redistribution scheme, because it gives you fuck-you-money, or at least the next closest equivalent.

This is the main reason I want a basic income. I want persons who have a job to be the same persons who want that job. If nobody wants that job then there is something wrong about that job - maybe it doesn't pay well or maybe the job conditions are horrible. But in any case, I think we will all be better off if our workers are people who want that particular job rather than people who are stuck with that job and can't afford to quit.

comment 8y ago · link · parent

I've got the ball rolling at https://gitlab.com/amagpiesnest/amagpiesnest.gitlab.io

Please sign in and request access to contribute.

comment 8y ago · link · parent

Here is a naive question:

Let's say I want a small application with flask and angular.

I create a single repo for both flask and angular. I put everything flask in one sub folder called backbend and I put everything angular in another folder called frontend

WIP here: https://github.com/kusl/flaskexperiment or https://git.sr.ht/%7Ekus/flaskexperiment/

Now the problems are just starting: how do I set up ci for all my projects? Travis ci expects a single file at the root of the project and so does gitlab ci (hi sid, big fan)

I am sad I can't talk to the experts at Google about how they navigated these problems. I understand Google has many enemies that are constantly trying to exploit whatever but I still wish we could have a more open conversation here.

comment 8y ago · link · parent

Are you thinking something like pg_timezone_name?

https://www.postgresql.org/docs/current/static/view-pg-timez...

https://gist.github.com/justqyx/11245900