4 ms·
Show HN: Just F-Ing Ping
- staz 3y agoAwesome I always wanted something like this and didn't make the connection it would be that obvious to do. Thanks! You are going to make my life nicer
- mcsniff 3y agoHonestly, a right-click option for "copy naked/root/plain domain" instead of copying the entire address with protocol would make sense for almost browser; they all ship with developer tools pre-installed. Control click, shift+ctrl+c would work, there are many ways to do this.
- schappim 3y agoThanks for the tip but I don't seem to have this option on Chromium based browsers on macOS.
- wannacboatmovie 3y ago"Copy text that is highlighted to the clipboard" is a paradigm that has existed for 40 years until we-know-better Google decided to break it.
- londons_explore 3y agoSend a pull request...
- TacticalCoder 3y agoI've got several Bash aliases that are "wrappers" around functions like that and which help "fix" commands / find common mistakes. The one thing to keep in mind while doing that is that you should not modify how a command behaves in the happy case and your wrapper should only be used when using the shell yourself. Do not wrap commands and then use the wrapper from shell scripts, for example. Otherwise you'll be sorry out of luck if you copy your script to another script.
- yonatan8070 3y agoSounds interesting, do you have a repo with your fixes somewhere?
- ithkuil 3y agoI agree. But on the flip side if you only use functions you can't use them in xargs, parallel etc. So I often so use my own wrapper scripts in a dir in front of PATH and I pay the price of occasionally sharing bad scripts with my coworkers. Most of the time those broken scripts are caught by CI but not all scripts are... I know that technically I could wrap /bin/sh /bin/bash with a wrapper that strips my wrapper dir from PATH but that's too invasive and I don't want to do that. I wonder if there is a trick? Perhaps some pre-run hook that one can register in some advanced shells (e.g. I actually use zsh)?
- system16 3y ago> Modern browsers, believing they are being clever, hide the protocol in the URL bar. Not all, thankfully. Safari doesn't do this.
- vivzkestrel 3y agostupid question: why do you want to find the ping from the browser tab?
- andreareina 3y agoCan't load site on the browser, so I want to ping the server to see if it's up.
- londons_explore 3y agoI kinda wish the browsers error page would do this. I want it to give a brief summary of: * Was the TCP connection established. * Was an ICMP error sent back (ie. Connection refused) * Is the host pingable * Is any other host pingable. * Does the local machine have an IP address. * What did the DNS response look like. Etc. Obviously all that lot should probably be under a 'stats for nerds' title.
- schappim 3y agoYup, see if a server is up or get the IP to determine the hosting provider.
- wannacboatmovie 3y agoNo. No, no, no, a thousand times no. We shouldn't come up with workarounds for Google's shitty software. It enables them in furtherance of their goal of wrecking the Internet beyond recognition. The solution is to file a bug report and get them to fix their broken software. They have a monopoly, way too much money, and developers who need to justify their existence so they come up with these ridiculous "improvements" no one asked for. The clipboard bug is just one thing wrong with the picture; the trimming of the protocol and the asinine "tune" icon which replaces the lock (which thankfully Safari and Edge have refused to follow this trend, with MS having to patch out this nonsense from the tree because they understand their customers aren't insane). Present-day Chrome is as if "The Homer" car was a web browser. Enough of the avant-garde crap; I wish Google would just go away. They are the obnoxious rich kid in the room and have overstayed their welcome.
- n0ot 3y agoI don't think you're stripping the userinfo quite right. You're stripping everything after the at-sign, when you want to strip what's before: scheme://user:password@some.host:port/path?query_key=query_value&another_key=another_value#fragment
- ithkuil 3y agoDoesn't chrome remove the user info (or at least the password part) from the URL? (On mobile now cannot check) EDIT: check: it does it only after successful access. If the browser still presents the basic auth window because the backend responds unauthorized then copy&paste data will contain the full userinfo
- OskarS 3y agoSeems like an excellent use case for trurl [1], a tool built on curls url parsing functions (which can presumably handle any weird url format you throw at it), though I'm not sure how well packaged/available it is. [1]: https://github.com/curl/trurl https://github.com/curl/trurl
- qwery 3y agoMake more noise about bad UI design. As far as I'm concerned, this particular behaviour is a product of an incorrectly designed user interface. Within the Windows-style clipboard paradigm, pressing 'copy' in a text field has always been a command saying "copy my selection to the clipboard". The program ignores half of this command and acts in a surprising way.
- ay 3y agoIn this particular case a fair bit of noise was made when it was introduced; namely - the UI hiding the URI scheme. It started in Chrome. https://superuser.com/questions/1356867/chrome-69-hiding-www-and-protocol https://superuser.com/questions/1356867/chrome-69-hiding-www... All the noise was summarily ignored, “because we know better”. We need more browser diversity.
- stavros 3y agoWe have more browser diversity. Use Firefox.
- ay 3y agoI use Firefox since the time it was Netscape Navigator 2.0. Unfortunately that’s not the case for almost 70% of the others. Thus de-facto there is no browser diversity. The only saving grace for me as a user is majority of the things possible are already standardized, so there is a relatively small vendor lock-in surface, thus I am not quite forced to switch to chrom.*
- stavros 3y agoMy comment was mostly aimed to other people (I suspected you might be using Firefox).
- quickthrower2 3y agoNice work. Drives me nuts that you have to strip off the protocol. I get the logic but UX is better if you allow it. We are in a REST all the things universe now.