Skip to content

Instantly share code, notes, and snippets.

Avatar

Fredrick P. DerfOh

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am derfoh on github.
  • I am derfoh (https://keybase.io/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
DerfOh / ssl-date-check.md
Created Jan 13, 2017
How to check the SSL cert expiration date using command
View ssl-date-check.md

How to check the SSL cert expiration date using command

echo | openssl s_client -connect www.google.com:443 2>/dev/null | openssl x509 -noout -dates
@DerfOh
DerfOh / add-keys.md
Last active Jan 2, 2017
Add SSH Keys to server
View add-keys.md

How to add your ssh keys in one line

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

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
DerfOh / change script execution.md
Created Dec 21, 2016
change execution mode of a shell script that is written on windows
View change script execution.md
git update-index --chmod=+x foo.sh

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

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
DerfOh / cygwin-colors-email.md
Last active Dec 21, 2016
Changing cygwin colors
View cygwin-colors-email.md

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
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
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
You can’t perform that action at this time.