
Show HN: Code on Hacker News - anonfunction
https://code.hn/top
======
joeframbach
Fyi, your links at the bottom don't work.

    
    
        <a href="https://github.com/montanaflynn/codehn" onclick="trackOutboundLink(this); return false;">(source code)</a>
    

Either the tracking thing or the `return false` is causing the click to not
actually click. Let's be real: everyone on this site is blocking your tracking
whatchamajig.

~~~
anonfunction
What browser are you using? I'm using Chrome and they work fine. It's just
google analytics event tracking, and I can assure it's not blocked by everyone
on HN.

~~~
joeframbach
Are you blocking trackers with something like ublock?

~~~
anonfunction
No I am not. I was interested in if people would click the bottom links and I
have got quite a few events so far. I wonder if there is a way I could detect
if google analytics is blocked and just fire the window location change.

Edit:

I added a check to make sure google analytics is not blocked, it should work
for you now.

Thanks for letting me know.

~~~
joeframbach
Links to github already get tracking for free from github. Check out
[https://github.com/montanaflynn/codehn/graphs/traffic](https://github.com/montanaflynn/codehn/graphs/traffic).
It'll look like this:
[https://i.imgur.com/NQOjGbO.png](https://i.imgur.com/NQOjGbO.png) (example
from one of my projects)

~~~
anonfunction
Yeah I know about that, I wanted to play around with the links in the bottom
and see what got clicked the most. I added a check to make sure google is
loaded, can you try again?

~~~
joeframbach
:+1: lgtm

------
krapp
This is nice, but it would be better (and more useful than a plain HN search)
if it included project data through the Github API, like stars, license,
languages, etc.

~~~
anonfunction
I was planning to add a filter by language which I get from GitHub API but I
like the idea of adding other metadata as well. Thanks for the suggestion.

------
gus_massa
It looks too similar to the official page. I'm not sure if in this cases they
send a friendly email or a nastygram, but I think you should make some small
changes in the look and feel so it's clear that it's a different site.

Also, does it only show the github links or it also shows the gitlab links?

~~~
anonfunction
Thanks for the feedback, I guess I tried to copy the style exactly except
using newer html / css than tables. I'm thinking maybe a chrome extension
might be a better choice for this, especially since the API leaves a lot to be
desired.

It shows links for both github and gitlab links.

Edit: I changed the logo and favicon from a Y to a C.

~~~
dang
It looks fine to me. You might make the top color different; then it would
obviously be distinct.

> the API leaves a lot to be desired

Yes, it does. We're going to make a new API that gives you a simple JSON
version of any HN URL. Would that address any of the concerns you encountered?

~~~
anonfunction
That would definitely be what I was hoping for.

The main problems I had were:

1\. The stories endpoints were limited to 200 or 500 results, not paginated.

2\. I had to loop over and send a request to all the individual stories to
check if the url was from github or gitlab.

3\. There was not an endpoint for "show new" (/shownew)

4\. It was unclear from the docs what is shown on the website homepage
(beststories or topstories?)

~~~
dang
Ok, that's a good confirmation that it's the right approach. Sorry I don't
have a timeline for you but we'll get there.

------
anonfunction
Hey HN! I've had this domain forever so finally decided to make a website for
it.

I use the HN API to get the stories and then filter out any none code stories.
Next up I will add a filter for programming language so you can easily see all
the latest projects in your preferred language.

The server is written in Golang and I used nginx with Let's Encrypt for a free
SSL certificate.

~~~
abhishekjha
Wait, you can get a free SSL certificate? I thought it was always a paid
service.

~~~
masukomi
Let's Encrypt is all about giving people free SSL certs and basically any
hosting provider worth its salt has started offering them for free to their
customers: [https://letsencrypt.org/](https://letsencrypt.org/)

------
michaelmior
Perhaps this is just because of the current stories, but what's the difference
between this and
[https://news.ycombinator.com/from?site=github.com](https://news.ycombinator.com/from?site=github.com)
?

~~~
anonfunction
That is pretty much what I hoped to create. I just didn't know about that, I
wish I had because I've wanted this functionality for years.

One difference is that ?site=github.com seems to only work on the /from page
so the results are not broken into top / new / best / show pages.

I'm also planning to add a filter so you can only see projects for your
language of choice.

~~~
michaelmior
Cool! Wasn't knocking your project, just trying to understand. A language
filter would be nice :)

