Skip to content

Instantly share code, notes, and snippets.

View niveus's full-sized avatar

Jason Gabriele niveus

View GitHub Profile
@niveus
niveus / convert-ec-private-key-openssl-to-apple.rb
Last active May 4, 2021 14:45
This converts an OpenSSL generated EC key to a format readable by iOS. Only tested on 256 and 512 bit keys
#!/usr/bin/env ruby
# Converts an Openssl format ec private key to an iOS Compatible version
# Generate a key using something like `openssl ecparam -name prime256v1 -genkey -noout -out openssl.key -outform der`
unless ARGV.length > 1
puts "You need to specify an input and output file name"
exit 1
end
@niveus
niveus / .bash_profile
Last active October 14, 2016 14:55
My Mac Bash Profile
# Enable bash completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
# Customize the prompt
if [[ ${EUID} == 0 ]] ; then
PS1="\[\033[01;31m[\]\h\[\033[01;37m\] \033[01;34m\w \033[0;33m\t\033[01;31m] \n\$\[\033[00m\] "
else
PS1="\[\033[01;32m[\]\u@\h\[\033[01;37m\] \033[01;34m\w \033[0;33m\t\033[01;32m] \n\$\[\033[00m\] "
set nocompatible
filetype indent plugin on
syntax on