Skip to content

Instantly share code, notes, and snippets.

@jerelmiller
jerelmiller / index.tsx
Last active February 23, 2023 04:30
Apollo Client Suspense
// Our encouraged use of suspense in Apollo will comprise of 2 hooks: useBackgroundQuery and useReadQuery (final names TBD).
// Using these 2 together encourage the use of the render-as-you-fetch pattern to start fetching as soon as possible:
// https://17.reactjs.org/docs/concurrent-mode-suspense.html#approach-3-render-as-you-fetch-using-suspense
const Parent = () => {
// This hook provides no access to data. It's meant purely as a fetching mechanism
const { promise } = useBackgroundQuery(QUERY);
return (
<Suspense fallback="Loading...">
if [ -z "$1" ]
then
echo "Please supply a subdomain to create a certificate for";
echo "e.g. www.mysite.com"
exit;
fi
# Create a new private key if one doesnt exist, or use the xeisting one if it does
if [ -f device.key ]; then
KEY_OPT="-key"
@jerelmiller
jerelmiller / ApacheHTTPSConfig.md
Created December 28, 2016 07:53 — forked from nrollr/ApacheHTTPSConfig.md
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@jerelmiller
jerelmiller / README.md
Created December 28, 2016 07:47 — forked from jonathantneal/README.md
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@jerelmiller
jerelmiller / custom_plan.rb
Created September 5, 2014 18:13
Zeus Test Console
require 'zeus/rails'
class CustomPlan < Zeus::Rails
# def my_custom_command
# # see https://github.com/burke/zeus/blob/master/docs/ruby/modifying.md
# end
def default_bundle_with_test_env
::Rails.env = 'test'
@jerelmiller
jerelmiller / .gitignore
Last active August 29, 2015 14:06
Zeus boot config
\._*
\.DS_Store
*\.sublime*
*i18n*
*.mov
*.swp
bin/
tmp/
*\.tmproj
*.pt