Hacker Newsnew | past | comments | ask | show | jobs | submit | nunull's commentslogin

SEEKING WORK | Germany or Remote

I am a web developer and designer. As a designer, I am interested in unusual web design and creative coding. On the technical side I have a strong background in software development, with five years experience working for a larger OSS-based German software company.

What I do: web development, software development, design, creative coding

Technologies: Kirby CMS, PHP, JavaScript, Vue.js, SCSS

E-Mail timm@timmalbers.de Website: https://timmalbers.de


SEEKING WORK | Germany | Remote

I am a web developer and designer with a strong background in software development. Before freelancing, I've worked for a larger OSS-based German software company for five years. As a freelancer I mainly develop websites based on Kirby CMS, but I also do generative art, design and motion design. My projects range from simply implementing a given web design to projects including concept, design and implementation.

What I do: web development, software development, design, generative art, motion design

Technologies: Kirby CMS, PHP, JavaScript, Vue.js, SCSS

E-Mail timm@timmalbers.de Website: https://timmalbers.de/en


I frequently found myself in need of sending clients information on how to reload websites without cache. This often involves asking for their OS and browser first, which can make it somewhat tedious. There are quite a few articles explaining the different shortcuts per OS / browser, but they are full of ads most of the time, which is why I build this in an afternoon.


This is really cool. One drawback is that it seems to touch the index, which I believe should be avoided, since it can disrupt the users workflow. I experimented with something similar a few years ago and avoided the index. My learnings are partially documented in the repo.[1]

[1]: https://github.com/nunull/git-autosave


Not the first thing to look for, but I've found ShellCheck[1] to be pretty helpful when it comes to correcting typical mistakes.

[1]: https://github.com/koalaman/shellcheck


Seconded. Running ShellCheck integrated with your editor (easy with vim/Syntastic) is really great way to improve your bash skills.

It will highlight common mistakes, and their wiki explains each one detail and how you should use an alternate, better implementation.


This is a great addition while writing bash scripts. Catches a lot of the bad stuff.


This returns the length, not the line itself.

Edit: `lines.reduce((line, line_) => line_.length > line.length ? line_ : line, '')`


Thanks, edited.


Regarding 1: I think the sorting approach is actually really nice in this case. Clearly it's not as efficient as a simple loop, but it's safer and more readable. Explicit looping and mutation can introduce nasty bugs which this kind of declarative approach can't.


No need to mutate/slice/sort anything

    Math.max(...lines.map((line) => ctx.measureText(line).width))


I am of the same opinion, always go for correctness before performance, efficiency can be tuned later if it's even needed.


    $ git pull origin master
    Your local changes to the following files would be overwritten by merge: user.abcd.suo
Suggestion: git rm --cached user.abcd.suo

Wooaa, no! (Now your local changes are gone.)


And maybe that's desired.

Or maybe it isn't.

The main problem with this, as I see it, is the lack of knowledge of the user's intention.

Without that, it's only good for total basics that built-in correction or 'thefuck' would handle.

With that, well.. that's StackOverflow.


Nice read! I'd really like to know when we can expect the next post to be published.


Thanks :) Second post is in the works, will probably be out next week when I have time around college :)


> head extracts the first element of a list, which must be non-empty.

Those functions operate on lists. I think it should read as follows.

    const head = (xs) => xs[0];
    const last = (xs) => xs[xs.length-1];
    const tail = (xs) => xs.slice(1);
    const init = (xs) => xs.slice(0, -1);
Am I missing something?


For some reason, the original author decided the arguments themselves were the "list" to operate on which is indeed a bit weird and non idiomatic.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: