Skip to content

Instantly share code, notes, and snippets.


Jake Ginnivan JakeGinnivan

View GitHub Profile
View VSCode for
"omnisharp.enableImportCompletion": true,
"omnisharp.enableRoslynAnalyzers": true,
"omnisharp.organizeImportsOnFormat": true,

Then Use NX to manage the mono repo and the .net (and other languages) of projects.

Can then pnpm nx run-many --target=build --all to build all projects, .net or otherwise.

JakeGinnivan / Pulumi.yaml
Last active January 12, 2023 10:17
Pulumi /w TypeScript project references + dynamodb lock
View Pulumi.yaml
name: serverless-mono
description: Serverless mono infrastructure
url: s3://my-pulumi-state-bucket
name: nodejs
typescript: false
region: ap-southeast-2
View react-ssr-component-data-load.jsx
class SomethingComponent extends React.Component {
componentWillMount() {
// If we don't have an article, load it
if (!this.props.article) {
render() {
if (this.props.loading) {
View react-ssr-transfer-state.js
`<script> = ${serialize(store.getState())}</script>`
View react-ssr-resolve-all.js
// Note, doesn't deal with timeouts, infinite recursion, errors etc..
async function resolveAll(render, promiseTracker) {
const renderResult = render(promiseTracker)
if (promiseTracker.hasWork) {
await promiseTracker.waitForCompletion()
return resolveAll(render, promiseTracker)
return renderResult
View react-ssr-redux-action.js
type: 'MY_ACTION',
payload: {/* Data goes here */}
View react-ssr-assets.json
"main": {
"js": "/static/js/main_043b2e805d67f533bad6.js",
"css": "/static/css/main.1e87b891.css"
"vendor": {
"js": "/static/js/vendor_d4b74274cd66cdfe271f.js"
View react-ssr-data-load-function.js
function loadArticle(id) {
return async function(dispatch) {
// Dispatch an action indicating we have started loading
// When reduced, the state would likely indicate we
// are in a loading state
// Perform the load of the data
const loadedArticle = await api.loadArticle(id)
View react-ssr-redux-action-creator.js
function articleLoaded(id, article) {
return {
payload: { id, article }
View react-ssr-render-html.js
import assets from '../assets.json'
function renderHtml(renderedMarkup: string) {
return `<!DOCTYPE html>
<link id="css-main" type="text/css" rel="stylesheet" href="${assets.main