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
// ATOMIC COUNTER | |
// no other operations can happen before or after state of the data being modified | |
const updateParams: DocumentClient.UpdateItemInput = { | |
TableName: GENERIC_TABLE, | |
Key: { pk: `ORG#${organizationId}`, sk: `USER#${userId}` }, | |
ReturnValues: 'UPDATED_NEW', | |
UpdateExpression: 'SET #itemCounter = if_not_exists(#itemCounter, :start) + :inc, #activeItems = if_not_exists(#activeItems, :start) + :inc', | |
ExpressionAttributeNames: { | |
'#itemCounter': 'itemCounter', | |
'#activeItems': 'activeItems' |
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 { isPlatformBrowser } from '@angular/common'; | |
import { | |
Directive, | |
ElementRef, | |
Inject, | |
OnChanges, | |
PLATFORM_ID, | |
Renderer2, | |
SimpleChanges, | |
input, |
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
# file path of makefile: src/functions/shared/Makefile | |
build-SharedLambdaLayer: | |
rm -Rf node_modules | |
npm install | |
npm run build | |
cp -rf dist/* ${ARTIFACTS_DIR} | |
npm prune --production | |
cp -rf node_modules ${ARTIFACTS_DIR} |
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 'zone.js/node'; | |
import { APIGatewayEvent, Context, APIGatewayProxyResult } from 'aws-lambda'; | |
import { APP_BASE_HREF } from '@angular/common'; | |
import * as express from 'express'; | |
import { CommonEngine } from '@angular/ssr'; | |
import { existsSync } from 'fs'; | |
import { join } from 'path'; | |
export const REQUEST = new InjectionToken<Request>('REQUEST'); | |
export const RESPONSE = new InjectionToken<Response>('RESPONSE'); |
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 the core angular services. | |
import { Pipe } from "@angular/core"; | |
import { PipeTransform } from "@angular/core"; | |
// ----------------------------------------------------------------------------------- // | |
// ----------------------------------------------------------------------------------- // | |
interface TrackByFunctionCache { | |
[ propertyName: string ]: <T>( index: number, item: T ) => any; | |
} |
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
du -sh ./node_modules/* | sort -nr | grep '\dM.*' |
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
``` | |
// breakpoints to be used in conjunction with media queries across app | |
@function rz-breakpoint($breakpoint) { | |
$breakpoints: ( | |
'extra-small': 599, | |
'small': 959, | |
'medium': 1279, | |
'large': 1919, | |
'extra-large': 5000, | |
); |
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
module.exports = (on, config) => { | |
on('before:browser:launch', (browser = {}, args) => { | |
console.log(config, browser, args); | |
if (browser.name === 'chrome') { | |
args.push("--disable-features=CrossSiteDocumentBlockingIfIsolating,CrossSiteDocumentBlockingAlways,IsolateOrigins,site-per-process"); | |
args.push("--load-extension=cypress/extensions/Ignore-X-Frame-headers_v1.1"); | |
} | |
return args; | |
}); | |
}; |
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
/** | |
* Display only completed todos | |
*/ | |
displayCompleted() { | |
this.currentFilter = 'completed'; | |
EmitterService.get(this.id).emit('displayCompleted'); | |
} | |
/** | |
* Display all todos | |
*/ |
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
{ | |
"name": "moment", | |
... | |
"typings": "./moment.d.ts", | |
... | |
} |
NewerOlder