Skip to content

Instantly share code, notes, and snippets.

View davidharting's full-sized avatar

David Harting davidharting

View GitHub Profile
@davidharting
davidharting / my-vote.md
Last active March 3, 2022 14:13
Choosing a tech stack for your next side project

Summary

This gist is in response to this thread.

I voted for Next.js for your next side project! I'll caveat this by saying of course any side project that you find fun and rewarding is a good idea. Just throwing my 2 cents in the ring.

Factors

Reward

  • Because Next.js is a full-stack framework, you can build an interactive app with frontend + server-side components using a single piece of tech and one repo. Having that end-to-end thing to touch and click on (or navigate with the vim mode you will undoubtedly add to your app 😆) should make the project more fun and rewarding (it does for me anyawys :)

Keybase proof

I hereby claim:

  • I am davidharting on github.
  • I am davideharting (https://keybase.io/davideharting) on keybase.
  • I have a public key ASC_S8oBKOByP0pRc7ouUhCHbKe0uLwvGDfxrcNyqbKTawo

To claim this, I am signing this object:

#!/usr/bin/env bash
# The bash-it theme that I use
# This is baserd on the Minimal theme with Python version and node version prepended
# Because the prompt gets long with the versions, a new line is appended and a
# $ prompt character is added
SCM_THEME_PROMPT_PREFIX="${cyan}(${green}"
SCM_THEME_PROMPT_SUFFIX="${cyan})"
@davidharting
davidharting / api_call_async_action_creators.js
Last active April 19, 2017 15:14
This provides an example of a factory for asynchronous actions that handle making HTTP requests and dealing with the response and errors.
/**
* Assumptions:
* - Using redux-thunk middleware
* - requester is an HTTP client service
* - normalizr function provided by a library (e.g., normalizr, json-api-normalizr)
*/
function createApiGetAsyncAction(resource, namespace) {
return function asyncAction() {
return function thunk(dispatch) {
@davidharting
davidharting / test.js
Created April 14, 2017 17:00
Trouble with yayson presenter
describe('weird that this fails', () => {
const yayson = require.requireActual('yayson')
it.only('should be able to render multiple times', () => {
const jsonApi = yayson({ adapter: 'default' })
const presenter = new jsonApi.Presenter()
presenter.type = 'people'
console.log(presenter)
/*
* Presenter { scope: {}, type: 'people' }
*/