Skip to content

Instantly share code, notes, and snippets.

View Fastidious's full-sized avatar
🐵
Just another one.

Fastidious Fastidious

🐵
Just another one.
View GitHub Profile
@Fastidious
Fastidious / colorman.zsh
Created August 16, 2016 11:56 — forked from boredzo/colorman.zsh
Color Terminal for bash/zsh etc..
man() {
env \
LESS_TERMCAP_md=$'\e[1;36m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[1;40;92m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[1;32m' \
man "$@"
}
@Fastidious
Fastidious / linux.md
Last active March 8, 2018 12:26 — forked from boredzo/linux.txt
The Linux Cheatsheet I published 12 and a half years ago (and almost 15 years after the original Linux Cheatsheet).

About the Linux Cheatsheet

maintained by Mac-arena the Bored Zo, [email address that no longer works] copyright 2003 Mac-arena the Bored Zo available from [URL no longer works] HTML/PHP version at [URL works but no longer has a mirror] MIRRORS WELCOME! please email me if you want to mirror. some commands submitted by Steve Leopardi [email address deleted], frost, and rajnchaos Linux Cheatsheet IS NOT PUBLISHED BY IDG BOOKS and anyone who says it is is

To generate it (from current date/time):
`date +%s`
Under macOS/BSD, to generate it based a given date:
`date -j -f "%d-%M-%Y" 20-12-2016 +%s`
And on Linux:
@Fastidious
Fastidious / border-glow.css
Created February 16, 2017 11:35 — forked from mystix/border-glow.css
CSS Glow Effect
a:hover {
/* border glow effect on hover */
box-shadow: 0px 0px 20px #000;
filter:progid:DXImageTransform.Microsoft.Glow(Color=black,Strength=20);
}
#!/usr/bin/env bash
usage() {
cat <<HERE
usage: git make-remote <project-name>
or: git make-remote <path/to/project-name>
HERE
}
GIT_SERVER="git.zikes.me"
@Fastidious
Fastidious / github_gpg_key.md
Last active September 28, 2020 01:07 — forked from ankurk91/github_gpg_key.md
[Signing commits using GPG (Ubuntu/Mac)] To use on GitHub, or any other git repository.

Signing commits using GPG (Ubuntu/Mac)

  • Do you have an Github account? If not create one.
  • Install required tool.
  • Latest Git Client.
  • gpg tools.
# Ubuntu
sudo apt-get install gpa seahorse
@Fastidious
Fastidious / .bash_profile
Last active March 7, 2017 22:09 — forked from fieg/.bash_profile
.bash_profile for OSX including autocomplete for ssh hosts
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
@Fastidious
Fastidious / ssl.md
Last active March 21, 2017 15:54
SSL Temp

Key and CSR Generation

This is how to generate a certificate request the right way, in 2017. When this changes (and it will), this document will be amended.

Generate the Key

We first generate a 4096 bits key for the domain.

openssl genrsa -out example.com.key 4096

@Fastidious
Fastidious / clearing-password-history.md
Last active October 4, 2017 11:36
Clearing Password History

Clearing Password History

Occasionally one has to violate best practices to clear password history.

AIX, and Linux:

chuser histsize=0 username
@Fastidious
Fastidious / reset-systemctl.md
Last active October 26, 2017 17:16
Resetting systemctl

Resetting systemctl

Easy, but I tend to forget:

# Check what else failed.
$ systemctl --failed
# Reset it
$ systemctl reset-failed