Hacker Newsnew | past | comments | ask | show | jobs | submit | aug-riedinger's commentslogin

How such uninteresting article can make it to the newsletter?


Probably too late to get some visibility, but I love this:

    function my-accept-line() {
      # check if the buffer does not contain any words
      if [ ${#${(z)BUFFER}} -eq 0 ]; then
        # put newline so that the output does not start next
        # to the prompt
        echo
        # check if inside git repository
        if git rev-parse --git-dir > /dev/null 2>&1 ; then
          # if so, execute `git status'
          git status
        else
          # else run `ls'
          ls -l
        fi
      fi
      # in any case run the `accept-line' widget
      zle .accept-line
    }
    # create a widget from `my-accept-line' with the same name
    zle -N accept-line my-accept-line
    # rebind Enter, usually this is `^M'
    bindkey '^M' accept-line
This replaces `enter` (empty command line), with either `ls` or `git status` if in a git repository.

This beautifully works as expected, I never got any bug because of this (as this could be expected for low level aliasing), and it does exactly what I'd expect: get current status of the current folder.

Now typing `git status` elsewhere is such a pain!


Late on this as well but in case it's useful to you, I use this for quick "git add":

  ga () {
          if test "$#" -eq 0
          then
                  echo "No arguments (0_0)?"
          elif test "$#" -eq 1
          then
                  git add -u && git commit -m "$(echo $1 | sed 's/^./\U&\E/')"
          else
                  git add ${@:1:$(( $# - 1 ))} && git commit -m "$(echo ${@:$#} | sed 's/^./\U&\E/')"
          fi
  }
Usage:

  # Add all modified files and capitalize the commit message
  ga "fix typo in README"
  # Add some files and treat last arg as commit message
  ga main.rs point.rs "speedup by 10e9"


I have:

    function extract () {
      if [ -f $1 ] ; then
        case $1 in
          *.tar.bz2)   tar xjf $1     ;;
          *.tar.gz)    tar xzf $1     ;;
          *.bz2)       bunzip2 $1     ;;
          *.rar)       unrar e $1     ;;
          *.gz)        gunzip $1      ;;
          *.tar)       tar xf $1      ;;
          *.tbz2)      tar xjf $1     ;;
          *.tgz)       tar xzf $1     ;;
          *.zip)       unzip $1       ;;
          *.Z)         uncompress $1  ;;
          *.7z)        7z x $1        ;;
          *)     echo "'$1' cannot be extracted via extract()" ;;
           esac
       else
           echo "'$1' is not a valid file"
       fi
     }
instead


Shall be a nice linux-ready laptop then!


I agree that the project not being open-source is a great no-go.

You guys should consider replicating the Wordpress model: open-source tools and paid plans for hosting & support.

Don't think that S3 or github pages are too simple for a user to being autonomous in deployment. IMHO typical use case for your product is a tech guyssetting things up for some non tech people to administrate and write content afterwards.

This means the keys are : - 0 tech steps in administration (no git push, no jekyll generate etc.) - plugins - plugins - plugins - themes - plugins

But clearly if this can become an alternative to WP, this is great because devs hate WP and it scales really bad, while static websites is the complete opposite.


I totally agree, although i would pay money for this code. Not being able to modify it makes it unusable in a custom jekyll setup.


You only hate not being able to edit your comment on HN. So do I.


Unused RAM is wasted RAM.

Gmail has an internal behavior that adapts its memory usage on available memory. It may fail in some specific situation (short and wide memory leak), but as a whole the idea is to use RAM as much as possible to make gmail faster.

And yes, gmail lacks of a "low memory consumption" button for those situation where automatic memory usage detection fails.

There is video of google explaining this voluntary behavior but I can't find it unfortunately.


> Unused RAM is wasted RAM.

This is just ignorant cliche.

> Gmail has an internal behavior that adapts its memory usage on available memory. It may fail in some specific situation (short and wide memory leak), but as a whole the idea is to use RAM as much as possible to make gmail faster.

This has nothing to do with Gmail, this is entirely to do with chromium. When my X-Server starts to freeze because 8 tabs taking up 2GB of memory means the OS is intensely swapping to and from disk; I'll take my unused RAM, thanks.


Typically doesn't work: HN made the whole "<http://example.com/foo>." a link


And this is being recursive...


Sam, I know I'm late, but what a pain it must have been to reply to those questions with so many messy comments with such crappy interface.

Don't you think the time has come to stop to fake advertising the success of simplicity and to build a proper HN interface? (Just looked at the sources to collapse all subcomments, and I found `<table>` tags, OMG)

I understand the whole "it's simple but it works, people use it"-thing, but what's the point, when [dozen of developpers](https://www.google.fr/search?q=hacker+news+collapse+comments...) are willing to make it for you, even for free.

Not very inspiring for startup builders either.


SEEKING WORK - Paris or Remote

Fullstack web dev experienced in building startup products. Good UX comprehension and lean methodologies.

I work with Rails, NodeJS and many front-end technologies, my favorite currently being React.

More info and contact on my portfolio: http://www.augustin-riedinger.fr


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

Search: