You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Albert Arvidsson
scmx
Developer at Standout AB in Växjö Sweden. I'm doing lots of JavaScript, React, Next.js, Ruby on Rails.
Hyper Term Fix cursor hard to see #hyper #hyperterm #macos #cursor #black #text #pointer
The text cursor in Hyper term can be very hard to see, so I looked into changing it to white or similar for better visibility.
Here's a related issue about this vercel/hyper#1045
The currently proposed solutions didn't entirely work for me until I used css: instead of termCSS:.
Capybara Selenium WebDriver running at a lower speed using sleep command #capybara #selenium #rails #
Capybara Selenium WebDriver running at a lower speed using sleep command
Ever wanted to run your integration/end-to-end test suite at a lower speed
so that you better could observe what's happening and perhaps make a recording of it?
Here's a a technique I've been using when writing tests with Capybara Selenium WebDriver.
Put this in test/test_helper.rb or maybe something like spec/support/capybara.rb.
How to split a Git commit and preserve message using ORIG_HEAD
A colleague told me he'd accidentally committed something. Now he wanted to remove it from the previous
commit and then put in a new commit. This is called splitting a commit, and here's the best way I know of how to do it.
Solution
git reset --soft HEAD~ Undo the last commit, but preserve "Changes to be committed"
git reset <some/path> Exclude what you want
git commit -C ORIG_HEAD Commit with the same message as before, which was stored in ORIG_HEAD
How to fix a frozen MacBook Pro TouchBar (killall ControlStrip)
How to fix a frozen MacBook Pro TouchBar
tl;dr killall ControlStrip
After having used a MacBook Pro with a TouchBar for a few months, I've experienced a few times that the TouchBar can sometimes
hang up so that none of the buttons work. I don't really use it that much, so I can just continue working, but it's annoying to not be able to change screen brightness etc.
The last few times I've just resorted to rebooting my computer after failing to google how to restart only the touchbar.
But today it was easier too google it. Cnet has an article that mentions various ways to fix it. For me it was enough to restart the ControlStrip, the rightmost part of the TouchBar.
Updating a local diverged git branch to latest remote without reset --hard. #git git checkout -B vs git reset --hard
Updating a local diverged git branch to latest remote without reset --hard
Sometimes you have a branch checked out locally that someone else owns and they do a force push.
Perhaps it's during a review when they have pushed all the needed fixups and got them approved.
So now they squash and force-push the branch. It's time for you to take a new look at the updated commits,
so you checkout the branch and try to update it.