Skip to content

Instantly share code, notes, and snippets.

gcloud services enable run.googleapis.com
gcloud services enable cloudbuild.googleapis.com
# Server
# Create container
gcloud builds submit \
--tag gcr.io/${GOOGLE_CLOUD_PROJECT}/employees-api:1.0.0 .
# Deploy service
gcloud run deploy employees-api \
@sis0k0
sis0k0 / tests.json
Last active February 5, 2020 19:36
[
{
"id": "english_vocabulary_basic",
"name":"English Vocabulary (Basic)",
"secondsForAnswer":"5",
"questions":[
{
"question":"куче",
"answer":"dog"
},
<Button
android:id="@+id/button_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send"
android:onClick="sendMessage"
android:background="@drawable/button_custom" />
ERROR in TypeError: Cannot read property 'version' of null
at readMetadataFile (/home/svlaeva@bedford.progress.com/newng5/node_modules/@angular/compiler-cli/src/transformers/metadata_reader.js:66:28)
at Object.readMetadata (/home/svlaeva@bedford.progress.com/newng5/node_modules/@angular/compiler-cli/src/transformers/metadata_reader.js:35:25)
at TsCompilerAotCompilerTypeCheckHostAdapter.getMetadataFor (/home/svlaeva@bedford.progress.com/newng5/node_modules/@angular/compiler-cli/src/transformers/compiler_host.js:413:34)
at StaticSymbolResolver.getModuleMetadata (/home/svlaeva@bedford.progress.com/newng5/node_modules/@angular/compiler/bundles/compiler.umd.js:31787:62)
at StaticSymbolResolver.hasDecorators (/home/svlaeva@bedford.progress.com/newng5/node_modules/@angular/compiler/bundles/compiler.umd.js:31514:46)
at analyzeFile (/home/svlaeva@bedford.progress.com/newng5/node_modules/@angular/compiler/bundles/compiler.umd.js:30061:63)
at AotCompiler._analyzeFile (/home/svlaeva@bedford.pr
import { NativeScriptRouterModule } from "nativescript-angular/router";
import { routes as homeRoutes } from "./home/home.routes";
export const routes = [
...homeRoutes,
{
path: "ninjas",
loadChildren: "./ninjas/ninjas.module#NinjasModule",
}
import { NgModuleFactoryLoader } from "@angular/core";
import { NSModuleFactoryLoader } from "nativescript-angular/router";
@NgModule({
providers: [
{ provide: NgModuleFactoryLoader, useClass: NSModuleFactoryLoader }
]
// ...
})
export class AppModule { }
@sis0k0
sis0k0 / publish
Created July 5, 2017 12:08
simple bash script for npm packages publish prepare
#!/bin/bash
set -e
# release defaults to patch (last number in semver)
RELEASE="patch" && [ -n "$1" ] && RELEASE=$1
# cut the release
VERSION=$(npm --no-git-tag-version version $RELEASE | sed 's/v//')
git add package.json
git commit -m "release: cut the $VERSION release"
import { NgModule, APP_INITIALIZER } from "@angular/core";
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
import {
on as applicationOn,
suspendEvent,
ApplicationEventData,
} from "application";
import { AppComponent } from "./app.component";
import { NgModule, NgModuleFactoryLoader } from "@angular/core";
...
import { NinjaModuleLoader } from "./ninja-module-loader";
@NgModule({
...
providers: [
{ provide: NgModuleFactoryLoader, useClass: NinjaModuleLoader }
]
})
import {
Injectable,
Compiler,
NgModuleFactory,
NgModuleFactoryLoader
} from "@angular/core";
import { path, knownFolders } from "file-system";
const SEPARATOR = "#";