Skip to content

Instantly share code, notes, and snippets.

View dgreenfield0's full-sized avatar

David dgreenfield0

  • San Francisco, ca
View GitHub Profile
@begleynk
begleynk / 01_papertrail.config
Last active February 23, 2021 09:03
Setup Papertrail for Elastic Beanstalk
# This is an example .ebextensions config for setting up Papertrail with AWS Elastic Beanstalk, with the ability
# to access environment variables within the created config files.
# This is done by not directly creating /etc/log_files.yml, but by having a shell script create it for us:
#
# /home/ec2-user/create_log_file.sh (created in the "files" block)
# - Creates /etc/log_files.yml
# - Can include environment variables from the host
#
# The first container command (00_create_log_file_yml) will execute the script.
#
@xkr47
xkr47 / letsencrypt-jetty.sh
Last active June 26, 2024 09:03
How to use Letsencrypt certificate & private key with Jetty
# input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with
# the "auth" aka "certonly" subcommand
# convert certificate chain + private key to the PKCS#12 file format
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem
# convert PKCS#12 file into Java keystore format
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks
# don't need the PKCS#12 file anymore
@grantland
grantland / README.md
Last active June 20, 2024 05:05
NextBus API
@ficusk
ficusk / GsonRequest.java
Last active April 9, 2024 09:03
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;