The best Hacker News stories from Show from the past day
Latest posts:
Show HN: Instantly create a GitHub repository to take screenshots of a web page
I built a GitHub repository template which automates the process of configuring a new repository to take web page screenshots using GitHub Actions.<p>You can try this out at <a href="https://github.com/simonw/shot-scraper-template" rel="nofollow">https://github.com/simonw/shot-scraper-template</a><p>Use the <a href="https://github.com/simonw/shot-scraper-template/generate" rel="nofollow">https://github.com/simonw/shot-scraper-template/generate</a> interface to create a new repository using that template, and paste the URL that you want to take screenshots of in as the "description" field.<p>The new repository will then configure itself using GitHub Actions, take the screenshot and save it back to the repo!
Show HN: HN Avatars in 357 bytes
Paste the following into the console of any HN page - for annotated avatars on all HN comments. (self contained code)<p><pre><code> for(u of document.querySelectorAll('.hnuser'))for(u.prepend(c=document.createElement('canvas')),x=c.getContext('2d'),c.width=18,c.height=14,s=u.innerText,r=1,i=28+s.length;i--;i<28?r>>>29>X*X/3+Y/2&&x.fillRect(6+2*X,2*Y,2,2)&x.fillRect(6-2*X,2*Y,2,2):r+=s.charCodeAt(i-28,x.fillStyle='#'+(r>>8&0xFFFFFF).toString(16)))r^=r<<13,r^=r>>>17,r^=r<<5,X=i&3,Y=i>>2</code></pre>
Show HN: HN Avatars in 357 bytes
Paste the following into the console of any HN page - for annotated avatars on all HN comments. (self contained code)<p><pre><code> for(u of document.querySelectorAll('.hnuser'))for(u.prepend(c=document.createElement('canvas')),x=c.getContext('2d'),c.width=18,c.height=14,s=u.innerText,r=1,i=28+s.length;i--;i<28?r>>>29>X*X/3+Y/2&&x.fillRect(6+2*X,2*Y,2,2)&x.fillRect(6-2*X,2*Y,2,2):r+=s.charCodeAt(i-28,x.fillStyle='#'+(r>>8&0xFFFFFF).toString(16)))r^=r<<13,r^=r>>>17,r^=r<<5,X=i&3,Y=i>>2</code></pre>
Show HN: HN Avatars in 357 bytes
Paste the following into the console of any HN page - for annotated avatars on all HN comments. (self contained code)<p><pre><code> for(u of document.querySelectorAll('.hnuser'))for(u.prepend(c=document.createElement('canvas')),x=c.getContext('2d'),c.width=18,c.height=14,s=u.innerText,r=1,i=28+s.length;i--;i<28?r>>>29>X*X/3+Y/2&&x.fillRect(6+2*X,2*Y,2,2)&x.fillRect(6-2*X,2*Y,2,2):r+=s.charCodeAt(i-28,x.fillStyle='#'+(r>>8&0xFFFFFF).toString(16)))r^=r<<13,r^=r>>>17,r^=r<<5,X=i&3,Y=i>>2</code></pre>
Show HN: HN Avatars in 357 bytes
Paste the following into the console of any HN page - for annotated avatars on all HN comments. (self contained code)<p><pre><code> for(u of document.querySelectorAll('.hnuser'))for(u.prepend(c=document.createElement('canvas')),x=c.getContext('2d'),c.width=18,c.height=14,s=u.innerText,r=1,i=28+s.length;i--;i<28?r>>>29>X*X/3+Y/2&&x.fillRect(6+2*X,2*Y,2,2)&x.fillRect(6-2*X,2*Y,2,2):r+=s.charCodeAt(i-28,x.fillStyle='#'+(r>>8&0xFFFFFF).toString(16)))r^=r<<13,r^=r>>>17,r^=r<<5,X=i&3,Y=i>>2</code></pre>
Show HN: Self-hosted service for creating random avatars
Show HN: French Republican Calendar based on equinoxes
Show HN: French Republican Calendar based on equinoxes
Show HN: A Go Library for Website Log Analysis
Show HN: A Go Library for Website Log Analysis
Show HN: SmoothWAN a simple home internet bonding router using Speedify
Show HN: SmoothWAN a simple home internet bonding router using Speedify
Show HN: I made my personal website a Pokémon-style minigame using Phaser 3
Repo here: <a href="https://github.com/ariroffe/personal-website" rel="nofollow">https://github.com/ariroffe/personal-website</a>
Show HN: I made my personal website a Pokémon-style minigame using Phaser 3
Repo here: <a href="https://github.com/ariroffe/personal-website" rel="nofollow">https://github.com/ariroffe/personal-website</a>
Show HN: I made my personal website a Pokémon-style minigame using Phaser 3
Repo here: <a href="https://github.com/ariroffe/personal-website" rel="nofollow">https://github.com/ariroffe/personal-website</a>
Show HN: A simple framework for writing a web scraper using Python decorators
Show HN: Sci-Hub Scholar – Firefox Extension Update v1.2
Sci-Hub Scholar is a browser extension that takes Google Scholar search results and tries to point them at Sci-Hub, where they can be read freely. The main selling point for this extension versus others is that it works right on the results page, rather than the article page at the pay-walled website.<p>One night, I decided I was going to do some research, only to find every Google Scholar Result behind a paywall. Trying to find the link on Sci-Hub, I ran into a bunch of issues:<p>* <a href="https://whereisscihub.now.sh/" rel="nofollow">https://whereisscihub.now.sh/</a> is down<p>* Annoying to copy/paste title to Sci-Hub<p>* Didn't want to be presented with another set of search results from my search results.<p>I've seen some other Sci-Hub extensions, most notably <a href="https://openaccessbutton.org/" rel="nofollow">https://openaccessbutton.org/</a>. However, most of these require you to go to the article page, then click the extension's button to finally be redirected. I thought I could do better.<p>I recently did an update pass to update with some features others have added and requested.<p>New Features for v1.2.0:<p>* Added support for all Google Subdomains. You can now use this extension on Google Scholar websites for any country!<p>* DOI is now listed next to the article title for articles where the DOI was found<p>* If the title's URL was updated to Sci-Hub, the Icon to the left will now point to the original article.<p>* More accurate DOI lookups!<p>Issues:<p>* Currently, I can't validate that the article exists on Sci-Hub, due to the way Firefox handles website permissions for extensions. I do not want to request permissions for all domains, but since the Sci-Hub domain can change, this is difficult.<p>* I'm afraid to port this to Chrome, because I don't want to lose my Google Account over something like this.<p>* It's a hassle to support manifest v2 for Firefox and manifest v3 for chrome. Haven't found a good workflow setup for developing for both browser platforms at the same time, from one codebase.<p>I welcome any feedback or recommendations on the issues. I also have planned features, and am open to contributions! The extension is all open source and can be found at: <a href="https://github.com/djfdat/sci-hub-scholar" rel="nofollow">https://github.com/djfdat/sci-hub-scholar</a><p>I hope this helps some people get access to the information they need!
Show HN: Graphsignal – Machine learning profiler for training and inference
Hi HN, I'm the founder of Graphsignal (<a href="https://graphsignal.com" rel="nofollow">https://graphsignal.com</a>). Graphsignal is a machine learning profiler. We've created it to make ML profiling simple and usable. It provides performance summaries, ML operation and kernel level statistics as well as detailed resource usage information necessary for making training and inference faster and more efficient.<p>Profilers help fix performance issues, improve user experience and reduce computation costs. Such improvements benefit machine learning profoundly; model training jobs that run for hours or days could be made much shorter and inference latency could be reduced resulting in significantly lower costs and improved user experience.<p>I realized the benefits in one of my previous projects, where the model would have to be trained regularly and be used for inference on huge amount of data. Having spent last decade developing profiling and monitoring tools, it seemed logical for me to use a profiler for the task. But since the training and inference were running remotely, I had a hard time using existing ML profilers.<p>TensorFlow and PyTorch provide built-in ML profilers, which utilize NVIDIA's profiling interface (CUPTI) under the hood for GPU profiling. One way to use those profilers is via locally installed TensorBoard or by logging the profiles.<p>In turn, Graphsignal Profiler (<a href="https://github.com/graphsignal/graphsignal" rel="nofollow">https://github.com/graphsignal/graphsignal</a>) uses the built-in profilers as well as other tools to enable automatic profiling in any environment, including notebooks, training pipelines, periodic batch jobs, model serving and so on, without installing additional servers/software. It also allows teams to share and collaborate online. Basically, the profiles along with environment and usage information are be automatically recorded and sent to Graphsignal where they are available for analysis.<p>Trying it out is easy: 1) sign up for a free account; 2) add the profiler to your ML code and run it; 3) see and analyze the profiles at graphsignal.com. Everything is described in the Quick Start Guide <a href="https://graphsignal.com/docs/profiler/quick-start/" rel="nofollow">https://graphsignal.com/docs/profiler/quick-start/</a>.<p>I'm very excited to show it to you here and will appreciate any thoughts, comments and feedback!
Show HN: Hubfs – File System for GitHub
Show HN: Hubfs – File System for GitHub