Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View fengerzh's full-sized avatar
🎯
Focusing

Buzz Zhang fengerzh

🎯
Focusing
View GitHub Profile
@fengerzh
fengerzh / match-ssh-keys
Last active April 1, 2018 04:10 — forked from mschmitt/match-ssh-keys
Matches Fingerprints from sshd logs (sshd on loglevel VERBOSE) against authorized_keys for the respective user.
#!/usr/bin/perl -w
use strict;
use diagnostics;
use File::Temp;
# Matches Fingerprints from sshd logs (sshd on loglevel VERBOSE) against
# authorized_keys for the respective user.
die "Please specify input file!\n" unless ($ARGV[0]);
@fengerzh
fengerzh / post-checkout
Created February 13, 2018 12:36
Git hook to update local username and email.
#!/bin/bash
function warn {
echo -e "\n$1 Email and author not initialized in local config!"
}
email="$(git config --local user.email)"
name="$(git config --local user.name)"
if [[ $1 != "0000000000000000000000000000000000000000" || -n $email || -n $name ]]; then