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, 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
//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
sudo mount -uw / | |
rm -rf /System/Library/Extensions/AMDRadeon* | |
rm -rf /System/Library/Extensions/GeForce* | |
rm -rf /System/Library/Desktop\ Pictures/* | |
find /System/Library/Templates/Data/System/Library/Speech -name PCMWave -exec rm -rf {} \; | |
rm -rf /System/Library/Screen\ Savers/*.saver | |
rm -rf /private/var/db/dyld |
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
``` | |
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty | |
``` |
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
interface Writer { | |
id: number; | |
username: string; | |
notIncludedAsWell: string; | |
} | |
interface Post { | |
id: number; | |
content: string; | |
notIncluded: 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
sudo apt-get install libblas3 libblas-dev | |
sudo apt-get install liblapack3gf liblapack-dev | |
sudo apt-get install gfortran | |
sudo apt-get install libhdf5-dev | |
sudo chmod -R o+w /usr/local/lib/python2.7/dist-packages | |
sudo chmod -R o+w /usr/local/bin | |
pip install numpy |
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 time | |
import math | |
import aetros.backend | |
job = aetros.backend.start_job('marcj/example-1', '----') | |
logging_channel = job.create_channel('logging_channel', type=aetros.backend.JobChannel.TEXT) | |
traces = [ | |
{ |
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
From previous released tag to latest tag: | |
PREVIOUS=`git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1)` | |
CURREN_TAG=`git describe --abbrev=0 --tags` | |
git log --format="%h - %s <%an>" "$PREVIOUS..$CURREN_TAG" | |
Format: | |
git log --format="%h - %s <%an>" "1.2.0..master" |