←back to thread

2039 points Gadiguibou | 2 comments | | HN request time: 0.498s | source
Show context
klausa ◴[] No.36491947[source]
`pbcopy` and `pbpaste` are one of my most-loved in the list.

Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.

replies(28): >>36492008 #>>36492015 #>>36492028 #>>36492101 #>>36492108 #>>36492229 #>>36492265 #>>36492890 #>>36492953 #>>36493037 #>>36493127 #>>36493336 #>>36493457 #>>36493802 #>>36494023 #>>36494242 #>>36494325 #>>36495379 #>>36495894 #>>36496866 #>>36497033 #>>36497293 #>>36497589 #>>36497973 #>>36498181 #>>36498558 #>>36498586 #>>36535798 #
lloeki ◴[] No.36493457[source]
Another frequent use I have, applying random diffs with git:

    git diff | pbcopy
    pbpaste | git apply
replies(1): >>36493493 #
1. js2 ◴[] No.36493493[source]
You can also use `git format-patch` and `git am` if you want to apply the same commit to multiple repos, a use-case I sometimes I have.
replies(1): >>36497014 #
2. verst ◴[] No.36497014[source]
I should use `git format-patch` instead of creating a mock draft PR (which I end up deleting) and modifying the URL to add `.patch` and then downloading the patch file haha. `git format-patch` would probably be faster :)