This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions ~/Library/Preferences/WebIde* | |
echo -ne "\n-Dawt.useSystemAAFontSettings=lcd\n-Dawt.java2d.opengl=true" >> ~/Library/Preferences/WebIde*/phpstorm.vmoptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this is more or less pseudocode, not tested, just to demonstrate how it could look like conceptually. | |
import {AppServerModule} from './src/main.server'; | |
import {ngExpressEngine} from '@nguniversal/express-engine'; | |
const puppeteer = require('puppeteer'); | |
const {join} = require('path'); | |
const {readFileSync} = require('fs'); | |
async function main() { | |
const renderer = ngExpressEngine({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ts-node-script | |
import 'reflect-metadata'; | |
import { Application, KernelModule } from '@deepkit/framework'; | |
import { http } from '@deepkit/http'; | |
import { entity, t } from '@deepkit/type'; | |
import { Database } from '@deepkit/orm'; | |
import { SQLiteDatabaseAdapter } from '@deepkit/sqlite'; | |
@entity.name('user') | |
class User { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ts-node-script | |
import 'reflect-metadata'; | |
import { Application } from '@deepkit/framework'; | |
import { http } from '@deepkit/http'; | |
import { ClassSchema, entity, getClassSchema, t } from '@deepkit/type'; | |
import { Database } from '@deepkit/orm'; | |
import { MongoDatabaseAdapter } from '@deepkit/mongo'; | |
import { ClassType, getObjectKeysSize } from '@deepkit/core'; | |
import { AppModule } from '@deepkit/app'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ts-node-script | |
import 'reflect-metadata'; | |
import { Application, onServerMainBootstrap } from '@deepkit/framework'; | |
import { injectable, InjectorContext } from '@deepkit/injector'; | |
import { t } from '@deepkit/type'; | |
import { AppModule, AppModuleConfig } from '@deepkit/app'; | |
import { ClassType } from '@deepkit/core'; | |
import { eventDispatcher } from '@deepkit/event'; | |
type Options = { exchange: string, routingKey: string, queue: string }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum OP { | |
string = 0, | |
number = 1, | |
boolean = 2, | |
object = 3, | |
function = 4, | |
array = 5, | |
date = 6, | |
class = 7, | |
interface = 8, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as Dockerode from "dockerode"; | |
import * as stream from "stream"; | |
import {ContainerCreateOptions, HostConfig} from "dockerode"; | |
export async function dockerRunWithStdIn( | |
docker: Dockerode, | |
stdin: NodeJS.ReadableStream | Buffer, | |
options: {name: string} & ContainerCreateOptions | |
): Promise<Buffer> { | |
return await new Promise<Buffer>(async (resolve, reject) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BenchSuite } from '../bench'; | |
const memoize = require('memoizee'); | |
function memoizeWithJIT(fn: Function, options: { stackSize: number } = { stackSize: 10 }): Function { | |
const stacks: string[] = []; | |
const variables: string[] = []; | |
const argNames: string[] = []; | |
for (let a = 0; a < fn.length; a++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Command = | |
'foo0' | |
| 'foo1' | |
| 'foo2' | |
| 'foo3' | |
| 'foo4' | |
| 'foo5' | |
| 'foo6' | |
| 'foo7' | |
| 'foo8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ | |
diff --git a/apps/frontend/src/app/app.tsx b/apps/frontend/src/app/app.tsx | |
index 0a2d3c2..7df6a6e 100644 | |
--- a/apps/frontend/src/app/app.tsx | |
+++ b/apps/frontend/src/app/app.tsx | |
@@ -1,9 +1,11 @@ | |
import React, { useEffect, useState } from 'react'; | |
-import { Message } from '@foo23/api-interfaces'; | |
+import { Message, User } from '@foo23/api-interfaces'; |