Skip to content

Instantly share code, notes, and snippets.

View JakeGinnivan's full-sized avatar
:shipit:

Jake Ginnivan JakeGinnivan

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

Then https://github.com/nx-dotnet/nx-dotnet. 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
JakeGinnivan / Pulumi.yaml
Last active January 12, 2023 10:17
Pulumi /w TypeScript project references + dynamodb lock
name: serverless-mono
description: Serverless mono infrastructure
backend:
url: s3://my-pulumi-state-bucket
runtime:
name: nodejs
options:
typescript: false
lock:
region: ap-southeast-2
class SomethingComponent extends React.Component {
componentWillMount() {
// If we don't have an article, load it
if (!this.props.article) {
this.props.dispatch(loadArticle(this.props.id))
}
}
render() {
if (this.props.loading) {
`<script>window.data = ${serialize(store.getState())}</script>`
// 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
}
{
type: 'MY_ACTION',
payload: {/* Data goes here */}
}
{
"main": {
"js": "/static/js/main_043b2e805d67f533bad6.js",
"css": "/static/css/main.1e87b891.css"
},
"vendor": {
"js": "/static/js/vendor_d4b74274cd66cdfe271f.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
dispatch(startLoadArticle(id))
// Perform the load of the data
const loadedArticle = await api.loadArticle(id)
function articleLoaded(id, article) {
return {
type: 'ARTICLE_LOADED',
payload: { id, article }
}
}
import assets from '../assets.json'
function renderHtml(renderedMarkup: string) {
return `<!DOCTYPE html>
<html>
<head>
<link id="css-main" type="text/css" rel="stylesheet" href="${assets.main
.css}">
</head>
<body>