Skip to content

Instantly share code, notes, and snippets.

$ git branch -r # list all remote branches

$ git commit --amend -m "New commit message" # Amend the most recent commit message

$ git remote -v # list remote branches

$ git remote add <origin> <https://github.com/user/repo.git> # sets a new remote

Emacs Commands List

collected from here and here

Queried search and replace

  • M-% prompt for search and replace strings
  • Spacebar Replace text and find the next occurrence
  • Del Leave text as is and find the next occurrence
  • . (period) Replace text, then stop looking for occurrences
  • ! (exclamation) Replace all occurrences without asking
@valyakuttan
valyakuttan / 01-pre-installation.md
Last active March 30, 2019 12:26
How to install Arch Linux on a Fujitsu Lifebook A514

Pre-installation

Download and verify Arch Linux image

After downloading the image and PGP Signature verify it's integrity with sha1sum and gpg

$ echo '<SHA1SUM> archlinux-x.x.x-x86_64.iso' | sha1sum -c -
archlinux-x.x.x-x86_64.iso:OK
$ gpg --verify archlinux-x.x.x-x86_64.iso.sig archlinux-x.x.x-x86_64.iso
should yield good signature
@valyakuttan
valyakuttan / arch_linux_cheat_sheet.md
Last active March 25, 2021 16:42
Arch Linux Cheat Sheet

Arch Linux Cheat Sheet

How to restore all packages to a specific date

Replace your /etc/pacman.d/mirrorlist with the following content:
##                                                                              
## Arch Linux repository mirrorlist                                             
## Generated on 2021-03-25                                                      
##
@valyakuttan
valyakuttan / gitcheatsheet.md
Last active November 10, 2023 17:36 — forked from RalucaNicola/github-commands.md
Common ly used git commands

Reverting a File to a Previous Commit

  • see all commits made to App.js.
    $ git log -- oneline src/App.js
  • Use the SHA value to to revert to the desired version
    $ git checkout 55a1dff -- src/App.js