Skip to content

Instantly share code, notes, and snippets.

Jonathan Keam jkeam

Block or report user

Report or block jkeam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# install gc
brew install jemalloc
# check for openssl installation location
brew list openssl
# install ruby
ruby-install ruby 2.6.4 -- --with-jemalloc --with-openssl-dir=/usr/local/Cellar/openssl/1.0.2s
# check for jemalloc
jkeam /
Created May 29, 2019
Encode a file into a base 64 format
# -A doesn't print out newlines and entire file will be on a single line.
openssl base64 -A -in ./input_file -out ./output_file
jkeam /
Created May 12, 2019
A lot of times building things on Macs require you to use to a codesigning identity. This quick one-liner will show you your code signing identities.
security find-identity -v -p codesigning
# get database info
heroku config:get DATABASE_URL -a app_name
# dump command
pg_dump --column-inserts --no-acl --no-owner -h host_name -U postgres_user -t table_name --data-only db_name > output_filename.dump
# install postgres
sudo apt update
sudo apt install postgresql postgresql-contrib libpq-dev
# login as postgres user
sudo -i -u postgres
# log into psql shell
jkeam /
Created Dec 25, 2018
Get My Mac IP
#ifconfig en0 | grep 'inet ' | awk '{print $2}'
ipconfig getifaddr en0
jkeam /
Last active Jan 25, 2018
Get SSL Cert
# usage: [port]
# eg)
# see cert
echo -n | openssl s_client -connect ${RHOST}:${RPORT} | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
View python_installation_notes
Install These Tools:
Then in .zshrc add:
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
jkeam /
Created Oct 12, 2017
I used this when taking multiline configs, like rsa keys to a single line that .env files can use.
awk '{printf "%s\\n", $0}' file
jkeam / replace_expo_urls.rb
Last active Aug 1, 2017
Ruby script to update expo config files that need to be updated as you change networks. This script will update the urls expo is using to serve up the JS resources. This configs should be auto updated during the build process, but for some reason it sometimes does not work. Running this script will fix those urls.
View replace_expo_urls.rb
#!/usr/bin/env ruby
require 'json'
require 'rexml/document'
include REXML
def fix_exshell_json(filename, url)
json_file = JSON.parse
json_file['developmentUrl'] = url, 'w') { |file| file.puts(json_file.to_json) }
You can’t perform that action at this time.