Skip to content

Instantly share code, notes, and snippets.

View Jahhein's full-sized avatar
🎃
Tinkering with my RaspberryPi... automation? NAS? Home-assistant? I need another

Jacob Hein Jahhein

🎃
Tinkering with my RaspberryPi... automation? NAS? Home-assistant? I need another
View GitHub Profile
@Jahhein
Jahhein / homebrew-permissions-issue.md
Created December 21, 2021 07:49 — forked from irazasyed/homebrew-permissions-issue.md
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@Jahhein
Jahhein / attributes.rb
Created November 24, 2020 16:38 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@Jahhein
Jahhein / github_gpg_key.md
Created November 19, 2020 10:15 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@Jahhein
Jahhein / node-and-npm-in-30-seconds.sh
Created November 17, 2020 01:20 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@Jahhein
Jahhein / curl.md
Created October 30, 2020 03:57 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@Jahhein
Jahhein / LinkedIn Partnership Scam
Created October 19, 2020 03:31
A scam based on linkedin, watch yourselfs.
Hi Devin,
Nice to meet you.
This is REMOVED who has 10+ years of software engineering.
I believe we can achieve great success with your English and my freelancing experience and coding skills.
I want to make partnerships with U.S. individuals who have some technical background since there are many big projects in US clients.
I have significant experience in freelancing and full-stack coding skills but not good at English.
What I want from you is to create and share your Upwork account with me.

Git Cheat Sheet

Visit my blog.

Commands

Getting Started

git init

or

@Jahhein
Jahhein / README.md
Created September 14, 2020 19:57 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
@Jahhein
Jahhein / YubiKey-GPG-SSH-guide.md
Created May 28, 2020 10:11 — forked from ageis/YubiKey-GPG-SSH-guide.md
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@Jahhein
Jahhein / gitcheats.txt
Created May 28, 2020 10:09 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# pretty tab'd git log
git log --graph --pretty="tformat:%h*(%ar)*<%an>*%d %s" $* | sed -Ee 's/(^[^<]*) ago\)/\1)/' | sed -Ee 's/(^[^<]*), [[:digit:]]+ .*months?\)/\1)/' | column -s '*' -t | cat
# change author of all git repos
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='yourname'; GIT_AUTHOR_EMAIL='youremail@example.com'; GIT_COMMITTER_NAME='yourname'; GIT_COMMITTER_EMAIL='youremail@example.com';" HEAD;
# stage only deleted files