Removing the last commit
To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.
If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.
If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.
| /* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
| This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
| closely match default behavior on Windows systems. This makes the Command key | |
| behave like Windows Control key. To use Control instead of Command, either swap | |
| Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
| or replace @ with ^ in this file. | |
| Here is a rough cheatsheet for syntax. | |
| Key Modifiers |
Note
(2025-01-08) Add feature for 🏷️Tag(Revision) Selection, contributed by @Bamboo-D.
(2024-12-17) Add feature for ⚡Quick Startup and ⏭️Fast Resume, enabling skipping of downloaded files, while removing the git clone dependency to accelerate file list retrieval.
Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, This command-line tool leverages curl and aria2c for fast and robust downloading of models and datasets.
- ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
| #cloud-config | |
| # Option 1 - Full installation using cURL | |
| package_update: true | |
| package_upgrade: true | |
| groups: | |
| - docker | |
| system_info: |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
Gotten from the RedHat GPG migration manual
## Export all public keys
gpg -a --export >mypubkeys.asc
| /* Variables */ | |
| :root { | |
| --item-padding: 14px; | |
| --item-title-link-font-weight: bold; | |
| --base03: #002b36; | |
| --base02: #073642; | |
| --base01: #586e75; | |
| --base00: #657b83; | |
| --base0: #839496; | |
| --base1: #93a1a1; |
These are manual instructions on enabling SSH access on your Steam Deck, adding public key authentication, and removing the need for a sudo password for the main user (deck).
This gist assumes the following:
- you have a Steam Deck
- you have a home PC with access to a Linux shell that can
ssh,ssh-keygen, andssh-copy-id - your Steam Deck and home PC are on the same local network, with standard SSH traffic (tcp/22) allowed over that network from the PC to the Steam Deck
NOTE: @crackelf on reddit mentions that steamOS updates blow away everything other than /home, which may have the following effects:
- removing the
systemdconfig forsshd.service, which would prevent the service from automatically starting on boot - removing the
sudoers.dconfig, which would reenable passwords forsudo
