Skip to content

Instantly share code, notes, and snippets.

View hfknight's full-sized avatar

fei.io hfknight

View GitHub Profile
@hfknight
hfknight / mojave_update_error_fix.md
Last active December 12, 2018 21:10
Fix Git Error: "Permission denied (publickey)" after updating mac os (Mojave)

Fix Git Error: "Permission denied (publickey)" after updating mac os (Mojave)

  1. in terminal, type xcode-select --install
  2. in terminal, go to .ssh/, type ssh-keygen -t rsa -C "[email protected]". This will create both id_rsa and id_rsa.pub files
  3. copy id_rsa.pub content to github project > add new SSH key
@hfknight
hfknight / git.md
Last active December 7, 2018 14:54

sync master (rebase)

git rebase master
git rebase --continue
git push -f 

overwrite local w/ remote

git reset --hard origin/branch-name

@hfknight
hfknight / node-npm-install.md
Last active December 12, 2018 21:11 — forked from rcugut/node-npm-install.md
Install node & npm on Mac OS X with Homebrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@hfknight
hfknight / yum-centos-5-fix.md
Last active August 9, 2019 16:42
CentOS 5 Yum Repository fix
  • Remove all .repo inside /etc/yum.conf.d/ directory
  • create a new repo file CentOS-Valut.repo
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/5.11/os/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5