Skip to content

Instantly share code, notes, and snippets.


Fredrick P. DerfOh

View GitHub Profile

Keybase proof

I hereby claim:

  • I am derfoh on github.
  • I am derfoh ( on keybase.
  • I have a public key whose fingerprint is 455B 12C4 3464 76B8 9808 2F98 363F 303C B42E BBBC

To claim this, I am signing this object:

DerfOh /
Created Jan 13, 2017
How to check the SSL cert expiration date using command

How to check the SSL cert expiration date using command

echo | openssl s_client -connect 2>/dev/null | openssl x509 -noout -dates
DerfOh /
Last active Jan 2, 2017
Add SSH Keys to server

How to add your ssh keys in one line

cat ~/.ssh/ | ssh user@hostname "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"
DerfOh /
Created Dec 23, 2016
cygwin change ctrl+arrow to normal mvmt behavior

Add the following lines to ~/.inputrc (C:\cygwin\home<username>.inputrc):

"\e[1;5C": forward-word   # ctrl + right
"\e[1;5D": backward-word  # ctrl + left 
View .vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=/cygdrive/c/Users/fpaulin/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
DerfOh / change script
Created Dec 21, 2016
change execution mode of a shell script that is written on windows
View change script
git update-index --chmod=+x

git ls-files --stage
DerfOh /
Last active Dec 21, 2016
convert all files in a dir to unix using dos2unix

Convert all files in a directory to Unix format

  1. Set up dos2unix

  2. Run the following in the directory

find . -type f -exec dos2unix {} \;
DerfOh /
Last active Dec 21, 2016
Changing cygwin colors

ls --color scheme

From: "Robert Mark Bram"

To: "Cygwin"

Date: Wed, 12 Jun 2002 02:44:32 +1000

Subject: ls --color scheme

Howdy all!

For the record, this is what I have found out about changing ls color scheme.

DerfOh / parsejson
Created Dec 14, 2016
simple example of using awk to parse a json output
View parsejson
echo "$status" | awk -F"[,:]" '{for(i=1;i<=NF;i++){if($i~/completed\042/){print $(i+1)} } }'
DerfOh / Bank Accounts
Created Jan 19, 2014
A helpful programming assignment
View Bank Accounts
+ CSC/CIS 276
+ Problem Solving and Programming II in Java
+ Assignment 1 due Jan 29, 2014 – 6%
+Objective of this Assignment:
+This is your first Java programming assignment. The purpose is to synthesize the introductory
+object-oriented programming concepts in Chapters 1 to 5 that include the C++ concepts learned