HNHacker News
TopNewBestAskShowJobs

jonS90

21 karma · joined April 27, 2013

submissionscomments
jonS90··on Speeding up my ZSH shell
I migrated from omz to zimfw and am reasonably happy.

But I have yet to meet anyone in real life who knows what zimfw is.

jonS90··on Git-absorb: Git commit –fixup, but automatic
Funny that I've been doing something nearly identical, but with way more boilerplate.

    fzfCommit() {
      local FZF_PROMPT="${FZF_PROMPT:=Commit: }"
      git log --oneline | fzf --border --prompt="$FZF_PROMPT" --height=10 --preview="git show {+1} --color=always" --no-sort --reverse | cut -d' ' -f1 | tr '\n' ' ' | sed 's/[[:space:]]$//';
    }
    function gfixup {
      local commit=$(FZF_PROMPT='Fixup Commit: ' fzfCommit)
      if [[ -z "$commit" ]]; then
        return 1
      fi
      set -x
      git commit --fixup "$commit" --allow-empty > /dev/null || return 1
      git rebase --interactive "$commit"~ --autosquash || return 1
    }
jonS90··on Ask HN: Any tool for managing large and variable command lines?
I use this in combination with FZF's ctrl-r command history which allows me to fuzzy search command history.
jonS90··on Bruno: Fast and Git-friendly open-source API client (Postman alternative)
This makes me think of an alternative that no one seems to be mentioning: http/rest files. They're git-friendly and there are community plugins to operate them from every major IDE.

I believed the standard was created by jetbrains.

https://www.jetbrains.com/help/idea/http-client-in-product-c...

jonS90··on Ask HN: Anyone Interested in Taking over Jsweet.org?
I used jsweet to accomplish something really cool once, bringing pieces of an archaic, tried-and-true java codebase into the browser. I had to downgrade java to accomplish it, and I had to manually fiddle with the outputted typescript, but I'm overall very grateful for JSweet (and my users would be too if they only knew). I hope there's a future for it.
jonS90··on Fish – Update on the Rust port
If it takes 5 seconds for your prompt to display or become interactive, yes.

As far as I'm aware, most of the other quality of life improvements can be reproduced in zsh with plugins. This performance bulletpoint makes me want to consider switching back to fish from zsh.

jonS90··on Something weird is happening on Facebook
I came here to ask the same...
jonS90··on Yank: Yank Terminal Output to Clipboard
This is how I make pbcopy/pbpaste work on both Linux and WSL (Windows Subsystem for Linux).

    if [[ "$(uname)" == "Linux" ]]; then
      if ! grep -q Microsoft /proc/version; then
        alias pbcopy='xsel --clipboard --input'
        alias pbpaste='xsel --clipboard --output'
      else
        alias pbcopy='clip.exe'
        alias pbpaste='powershell.exe -command "Get-Clipboard"'
      fi
    fi
jonS90··on Phones and apps reduce your ability to focus even when they don’t distract you
In Android you can configure Do Not Disturb to allow notifications from specific apps. I'm very curious if iPhone can do this.
jonS90··on American Academy of Sleep Medicine calls for elimination of daylight saving time
Sometimes I wonder if we need a new metric for time of day. The 24 system is very inconsistent throughout the year with respect to daylight.
jonS90··on American Academy of Sleep Medicine calls for elimination of daylight saving time
Lifestyle choices only get you so far if you have to figbt against your circadian rhythm to wake up before the sun. Your body wants to stay up late and wake up late, so you just end up sleeping less.
jonS90··on Linux Productivity Tools (2019) [pdf]
I do the same. This might be overboard to some, but I went a step further and installed a vim plugin that brought many of the emacs-style key bindings into vim.
jonS90··on Vim Anti-Patterns (2012)
When making code changes feels quick and effortless, I think you become more willing to try out different things and experiment, which ultimately enables you to learn your languages and frameworks faster and make better choices. When code changes feel arduous and time-consuming, you're less inclined to experiment and more inclined to tolerate unknowns and best-guesses. I think vim helps push things towards the former scenario.
jonS90··on Vim Anti-Patterns (2012)
It might be worth learning the readline keybindings. They are supported rather ubiquitously in all terminal shells (including REPLs and SQL prompts and such). If you use MacOS they are supported across the entire OS.

You can also adopt these keybindings inside vim with the tpope/vim-rsi plugin. This approach has been quite effective in my experience.

http://readline.kablamo.org/emacs.html