Preferences

AndrewHampton
Joined 892 karma
[ my public key: https://keybase.io/andrewhampton; my proof: https://keybase.io/andrewhampton/sigs/8ov2hJUPVQGL1VkZ-q-IkdcaOUSMeyA6E-G939rCCzk ]

  1. Is `jj split` a good option?
  2. Tangle has a great breakdown of what this means in their article yesterday: https://www.readtangle.com/emil-bove-trump-lawyer-federal-ju...

    Turns out, it's complicated.

  3. Part of me wonders if I should be on ozempic since I have a family history of several of the issues it's reported to help with.

    Another part of me wonders if all the ozempic headlines I've seen over the past few months are just an incredibly effective and well orchestrated ad campaign.

  4. I used this to build my current keyboard a few months ago. It was my first hand-wired keyboard, and this made it much more approachable. Thanks for creating it!
  5. What HTTP method would you expect the second example to use? `GET /users/delete?id=354`?

    The first has the advantage of being a little clearer at the HTTP level with `DELETE /users/354`.

  6. Yeah, I use about a dozen git aliases in my normal workflow. In case it's helpful, here are the relevant ones for this flow:

      alias git_main_branch='git rev-parse --abbrev-ref origin/HEAD | cut -d/ -f2'
      alias gapa='git add --patch'
      alias grbm='git rebase -i --autosquash $(git_main_branch)'
      alias gfx='git commit --fixup $(git log $(git_main_branch)..HEAD --oneline| fzf| cut -d" " -f1)'
    
    Another favorite is:

      alias gmru="git for-each-ref --sort=-committerdate --count=50 refs/heads/ --format='%(HEAD) %(refname:short) | %(committerdate:relative) | %(contents:subject)'| fzf | sed -e 's/^[^[[:alnum:]]]*[[:space:]]*//' | cut -d' ' -f1| xargs -I _ git checkout _"
    
    gmru (git most recently used) will show you the branches you've been working on recently and let you use fzf to select one to check out.
  7. This was 100% my inspiration. I used emacs+magit for years. After switching away from emacs for dev work, I still cracked it open for git interactions for another year or so. Eventually, I moved entirely to the shell with a bunch of aliases to replicate my magit workflow.
  8. Yeah, it's definitely less powerful that what absorb is doing. I wasn't trying to argue that it was equivalent. I just wanted to share a bash one-liner that I've had success with in case others find it helpful.

    > What if I want some parts of it into one commit and another parts into another?

    Looks like absorb will automatically break out every hunk into a separate fixup commit. My one-liner will create 1 fixup commit for everything that's staged. That's typically what I need, but on the occasions it's not, I use `git add -p`, as kadoban mentioned, to stage exactly what I want for each commit.

  9. FWIW, I've been using this alias for the past couple years for fixup commits, and I've been happy with it:

    > gfx='git commit --fixup $(git log $(git merge-base main HEAD)..HEAD --oneline| fzf| cut -d" " -f1)'

    It shows you the commits on the current branch and lets you select one via fzf. It then creates the fixup commit based on the commit you selected.

  10. A similar program exists for 4 towns in West Virginia: https://ascendwv.com
  11. > A team I worked with in the past came to the same conclusion - turning authorization rules into WHERE clauses is a very efficient way to solve this problem, if you can figure out a clean way to do it.

    For rails specifically, https://github.com/polleverywhere/moat was built with this in mind. It's heavily inspired by Pundit, but let's you write policies at the `ActiveRecord::Relation` level. So `policy_filter(Article).find_by!(id: params[:id])` would run something like `select * from articles where id = ? and id in (select id from articles where owner_id = ?);`.

  12. Another option would be for the B to dispatch a `CustomEvent` on itself. That event will bubble up the DOM until it hits A. A would then need an event listener that would probably stop propagation and do whatever bookkeeping is necessary.
  13. Thanks for the correction, good to know.
  14. This Kitty terminal isn't new. Going by the history on GitHub, this terminal predates the one you linked by a couple years.
  15. I never used the old trending page, but it sounds like the Changelog Nightly newsletter [1] is basically the same thing. It goes out every day at 9PM Pacific. It has 3 sections:

    - most starred repositories that haven't been in the newsletter before

    - most starred repositories that were created that day

    - most starred repositories

    1: https://changelog.com/nightly

  16. Poll Everywhere (YC S08) has Q&A question support with voting. I'm a developer at Poll Everywhere and we use it during our weekly townhalls. Our company was 40% remote before the coronavirus crisis, and my experience with the Q&A poll as a remote worker has been great.
  17. Oh, we do. We are generally pretty great at filling in good details in the body. I didn't mention that originally because I didn't think it was noteworthy.

    The main problem is very commit titles that end up looking like:

      feat(SomeScope.OtherScope.Class): add support for abc and xyz option
  18. We've been following conventional commits for our front end code for the last year or so at my work. In other repositories, we've loosely followed the keep a change log conventions. I find conventional commits great when your repository will produce a package to be consumed by others. For example, conventional commits for our shared JS code helps us produce great change logs and helps us easily follow semver for the NPM packages our other applications use.

    However, I don't find it that useful in the the final applications, even counter productive, since it typically will take up quite a bit of space in the commit title. Many of our front end devs completely ignore title length conventions now.

  19. FiveThirtyEight did a great podcast series on gerrymandering in 2017 [1]. It turns out to be a much more complicated topic than I expected. Some gerrymandering is even legally required to ensure proper representation of minority groups even if they live in somewhat distributed communities.

    1: https://fivethirtyeight.com/tag/gerrymandering-podcast/

  20. Although I believe it was a good idea to remove them, I miss the vote score shown on comments. I had a script that would highlight the top comments. This would frequently reveal insightful comments 2 or 3 levels deep in a random thread I would have otherwise missed.
  21. > We will take a zero tolerance approach to anyone using this software for any unethical purposes and will actively discourage any such uses.

    Why not change the license to enforce the use restictions?

  22. In case you're interested, Steve Yegge had a recent post about the origin of the marketplace: https://medium.com/s/story/jeff-bezos-jack-ma-and-the-quest-...
  23. This reminds me of a story one of my college professors told about the days when he helped automate factories in the 80s. Every night, the control server hey installed would go offline around 1am then come back up a few minutes later. It was never the exact same time or duration. After a few days of diving through the code with no progress, one of his co-workers decided to stay up all night at the factory and just watch the server. Around 1am, the cleaning lady came in, unplugged the server and plugged in her vacuum.
  24. Looks like it: https://addons.mozilla.org/en-US/firefox/addon/tree-style-ta...

    I'm using Firefox Nightly and it let's me install it.

  25. I'm not sure how it compares with Octotrack, but we've been using bundler-audit[1] for similar security checks in our dependencies. Here's a sample Dockerfile[2] for running bundler-audit against your Gemfile and Gemfile.lock

    1: https://github.com/rubysec/bundler-audit

    2: https://gist.github.com/andrewhampton/d78df6952e757fd1038401...

  26. I'll drop in the customary link to hammerspoon: http://www.hammerspoon.org

    It has a couple libraries for window management. One is plug and play, the other is lower level. Here is my config for setting up a 2x2 grid: https://github.com/andrewhampton/dotfiles/blob/master/hammer...

This user hasn’t submitted anything.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal