Skip to content

Instantly share code, notes, and snippets.

View dontpaniclabsgists's full-sized avatar

Don't Panic Labs dontpaniclabsgists

View GitHub Profile
{
"notes": [
{
"note": "E",
"octave": 4,
"duration": 300
},
{
"note": "D",
"octave": 4,
"function": {
"name": "play_notes",
"arguments": "{\n \"notes\": [\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"C\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"oc
{
"name": "play_notes",
"parameters": {
"type": "object",
"properties": {
"notes": {
"type": "array",
"description": "The ordered notes and pauses to play",
"items": {
"type": "object",
@dontpaniclabsgists
dontpaniclabsgists / angular.json
Last active November 13, 2023 21:51
Using JSON Server with Angular application configurations
// This is a partial example of the angular.json to show the new mock section under serve
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "json-server-demo:build:production"
},
"development": {
"buildTarget": "json-server-demo:build:development"
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
...
<UserSecretsId>[your guid]</UserSecretsId>
</PropertyGroup>
ngOnInit()
{
this.routerStateDataId = history.state['dataId'];
}
const navigationExtras: NavigationExtras = {
state: { dataId: A.component.dataId},
};
this.router.navigate([A.component.urlOfComponentE], navigationExtras);
name: 'Dependabot -- $(Date:yyyyMMdd)$(Rev:.r)'
jobs:
- job: 'Dependabot'
pool:
# requires macos or ubuntu (windows is not supported)
vmImage: 'ubuntu-latest'
# Vars to be passed to the docker image
variables:
<div [formGroup]="companyForm">
<div>
<label for="companyName">Company Name</label>
<input id="companyName" type="text" formControlName="companyName" />
</div>
<ng-container formArrayName="admins">
<ng-container *ngFor="let adminForm of admins.controls; let index = index">
<div [formGroupName]="index">
<input id="name" type="text" formControlName="name" />
<input id="email" type="text" formControlName="email" />
import { Component, OnInit } from '@angular/core';
import { FormArray, FormBuilder, FormControl, Validators } from '@angular/forms';
@Component({
selector: 'app-company-view',
templateUrl: './company-view.component.html',
styleUrls: ['./company-view.component.scss']
})
export class CompanyViewComponent implements OnInit {