Live data from Hacker News

How to track and display profile views on GitHub

rushter.com

41–50 of 113 posts

Re: How to track and display profile views on GitHub

#41
post #28

Unrelated badge ideas: 1. Write a watcher that periodically reports whether you’re actively using a coding-related app (Terminal, VS Code, etc.) to a server you control, and serve a “coding”/“not coding” badge on your profile page; (could even detect which project you’re working on, and display that;) 2. Write an Apple Watch app that periodically reports whether you’re asleep, and serve a “sleeping”/“awake”/“unknown”…

Would this Apple Watch app be able to detect increased heart rate and brisk hand movements?

Asking for a friend.

Re: How to track and display profile views on GitHub

#43
post #28

Unrelated badge ideas: 1. Write a watcher that periodically reports whether you’re actively using a coding-related app (Terminal, VS Code, etc.) to a server you control, and serve a “coding”/“not coding” badge on your profile page; (could even detect which project you’re working on, and display that;) 2. Write an Apple Watch app that periodically reports whether you’re asleep, and serve a “sleeping”/“awake”/“unknown”…

3. Write an integration to the local cemetery, and after funeral is successfully detected serve "alive/dead" badge on the profile page.

Maybe closer to reality than we think.

Re: How to track and display profile views on GitHub

#44
post #34

First I heard about a readme for your profile page. So the facebook-ification of GitHub progresses? At what point is LinkedIn going to be merged into GitHub? (Only partially /s)

It's just gone live in the last day or so. The designer talked about it here a few weeks ago: https://twitter.com/pifafu/status/1265773172520914944 Personally I don't see much reason for this to be implemented via a git repository (rather than a text field in a database, like the existing Bio text), other than "we're GitHub, everything's a git repository, so why not". At the moment, it's a single-file repository. Per…

To be honest, I'm not too concerned. Making it a git repo makes the history more readily available, but a bad actor could still get it from internet archive or other archive sites. And if the concern about forking is that someone could impersonate you, they could do so with a few extra steps by just looking at the rendered HTML of the README. I know there's something to be said for making malicious behavior more difficult to achieve, but in this case the amount of extra work someone would have to do is minuscule if this weren't implemented as public repos.

Re: How to track and display profile views on GitHub

#45
> The rest of the story is simple — you need to store a counter in the database and return an SVG image with the number of views as a response. Of course, there will be some extra requests from bots, but having such statistics is better than nothing.

"The rest of the story is simple" uh, no that's not simple at all! You want me to register a domain, get a hosting provider, create a database, and create logic to listen for requests with anti-bot detection? Please don't say this is simple.

Re: How to track and display profile views on GitHub

#46
post #3

Can we please not normalize this? Vanity tracking at its worst. You don't need to know.

why the need to make everything "social"? I doubt most of the population has levels of insecurity enough to be continually thinking where to implement such things.

Re: How to track and display profile views on GitHub

#47

Earlier quoted context omitted.

> the same way MySpace did back in the day. For us that weren't around in MySpace era, how did they do that?

I can't remember much about images - but basically filtering out question-marks and equals symbols (i.e. ...thing.php?some=value) in a lot of places. I remember getting Facebook and when they first started their API it was a bit better thought out, so they loaded images on the user's behalf. Some great reading about 'hacking' myspace at the time: https://samy.pl/myspace/

Right. So you just had to serve a counter up via http://example.com/path/to/my/counter.gif and embed whatever info you needed in the path to get around this.

Re: How to track and display profile views on GitHub

#49
post #28

Unrelated badge ideas: 1. Write a watcher that periodically reports whether you’re actively using a coding-related app (Terminal, VS Code, etc.) to a server you control, and serve a “coding”/“not coding” badge on your profile page; (could even detect which project you’re working on, and display that;) 2. Write an Apple Watch app that periodically reports whether you’re asleep, and serve a “sleeping”/“awake”/“unknown”…

Would this Apple Watch app be able to detect increased heart rate and brisk hand movements? Asking for a friend.

Not sure that sort of low level access is possible while the app is backgrounded. However, automatic sleep trackers have been available without official API since what, watchOS 2? So maybe.

You can also try to convince Apple to add that workout type. https://support.apple.com/en-us/HT207934

Look forward to WWDC 2021, introducing the favorite workout type of billions of people.

Re: How to track and display profile views on GitHub

#50
post #39
post #6

Earlier quoted context omitted.

I did some research before writing an article. GitHub started proxying images in 2014, and there are a lot of repositories that use this technique to keep their stats. I think GitHub is OK with that.

Re: proxy security concerns: >Unlike GitHub, most of them don't even bother proxying the image to hide IP, referrer, and browser agent. If you want to allow external images on your site, you must proxy them and hide everything about a person who requested it. > A person with bad intentions can trick a victim into opening your profile that looks completely legit and detect his IP and a browser. Can you explain this in…

Attack?

1. your browser opens image from external server (in this step the server gets your IP and potentially user agent as that's how browsers communicate with servers)

2. there is no step 2

Post reply on HN