Skip to content

Instantly share code, notes, and snippets.

View Jlevyd15's full-sized avatar

Jeremy Levy Jlevyd15

View GitHub Profile
@Jlevyd15
Jlevyd15 / Heroku SSL with Certbot.md
Last active January 31, 2025 07:23
Creating a SSL certificate locally using Certbot on Mac OS and deploying to an existing Heroku App

Creating a SSL certificate locally using Certbot on Mac OS and deploying to an existing Heroku App

Caveats

  • You must have a heroku app deployed on the hobby tier. This is NOT the free tier and costs ~7/month
  • i'm assuming you have homebrew installed. It will be need to install the Certbot client
  • i'm also assuming you have the heroku CLI tools installed

first up, run this to install the certbot client

brew install certbot
@Jlevyd15
Jlevyd15 / Redux.md
Last active February 1, 2017 18:04
Notes on Redux

Actions - actions are POJO that have two properties.

  • they contain a type and a payload.
  • Type: is basically a name for the action. Ex: TYPE: INCREMENT
  • Payload is state
  • we use these in Redux to pass as arguments to dispatchers we say dispatch an action

Reducers - reducers are pure functions that receive actions

  • they hold the state of the application in something called a store,
  • reducers contain the logic behind the action and actually do the thing to alter the state.
  • normally these are like switch statments that decide what will happen to state when a given action is called

keystonejs notes

Creating custom keystone Lists (models)

  • keystone lists or models basically map back to mongodb collections
  • each property you add into the model object will become a field in the keystone admin UI. The model itself will become a mongo collection in the db and the fields will also be stored under the collection.
  • each property you define in the model needs to have a type. Types are defined by the keystone api. There are many types that are built into keystone a list of them can be found Here

How to create a new list

@Jlevyd15
Jlevyd15 / Gulpfile.js
Created June 1, 2016 21:22 — forked from webdesserts/Gulpfile.js
Automatically reload your node.js app on file change with Gulp (https://github.com/wearefractal/gulp).
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
node;
/**
* $ gulp server
* description: launch the server. If there's a server already running, kill it.