This file contains hidden or 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
| aws dynamodb scan --table-name <TABLE_NAME> --select "COUNT" |
This file contains hidden or 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
| const gm = require('gm').subClass({ imageMagick: true }); // Enable ImageMagick integration. | |
| gm() | |
| .command("convert") | |
| .in(imageIn) | |
| .borderColor("white") | |
| .border(1, 1) | |
| .fill("none") | |
| .fuzz(`${fuzz}%`) | |
| .draw("matte 1,1 floodfill") |
This file contains hidden or 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
| # ssh -i ./MY.pem ec2-user@ec2-99-999-999-999.ap-southeast-2.compute.amazonaws.com | |
| export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig | |
| export PATH=/usr/bin:$PATH | |
| # No c compiler error | |
| # export LDFLAGS="-static -L/usr/lib64:/usr/lib" | |
| export LDFLAGS=-L/usr/lib64:/usr/lib | |
| export LD_LIBRARY_PATH=/usr/lib64:/usr/lib:/usr/lib/libharfbuzz.a | |
| export CPPFLAGS=-I/usr/include | |
| sudo yum-config-manager --enable epel |
This file contains hidden or 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
| sips -Z 40 --out generated/icon-iPhone20@2x.png icon.png | |
| sips -Z 60 --out generated/icon-iPhone20@3x.png icon.png | |
| sips -Z 58 --out generated/icon-iPhone29@2x.png icon.png | |
| sips -Z 87 --out generated/icon-iPhone29@3x.png icon.png | |
| sips -Z 80 --out generated/icon-iPhone40@2x.png icon.png | |
| sips -Z 120 --out generated/icon-iPhone40@3x.png icon.png |
This file contains hidden or 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 { | |
| RestApi, | |
| CfnAuthorizer, | |
| DomainName, | |
| EndpointType, | |
| CfnBasePathMapping | |
| } from "@aws-cdk/aws-apigateway"; | |
| import { Certificate, ValidationMethod } from "@aws-cdk/aws-certificatemanager"; | |
| import { Construct } from "@aws-cdk/core"; | |
| import { |
This file contains hidden or 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 cdk = require('@aws-cdk/core'); | |
| import greengrass = require('@aws-cdk/aws-greengrass'); | |
| import lambda = require('@aws-cdk/aws-lambda'); | |
| import { CfnCustomResource } from '@aws-cdk/aws-cloudformation'; | |
| import { PolicyStatement, Role, ServicePrincipal, CompositePrincipal } from '@aws-cdk/aws-iam'; | |
| import { group_deployment_reset_code } from '../lib/code/group_deployment_reset'; | |
| import { thing_vendor_code } from '../lib/code/thing_vendor'; |
This file contains hidden or 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
| const calcEdgePoint = (center: number, radius: number, degree: number): Point => { | |
| const degreeInRadians = degToRadians(degree); | |
| return [ | |
| center + Math.cos(degreeInRadians) * radius, | |
| center + Math.sin(degreeInRadians) * radius | |
| ]; | |
| }; |
This file contains hidden or 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
| const edgePointCalculatorFor = (center: number, radius: number) => (degree: number): Point => { | |
| const degreeInRadians = degToRadians(degree); | |
| return [ | |
| center + Math.cos(degreeInRadians) * radius, | |
| center + Math.sin(degreeInRadians) * radius | |
| ]; | |
| }; | |
| const calculateEdgePoint = edgePointCalculatorFor(60, 50); | |
| const eightyDegreesAlongCircle = calculateEdgePoint(80) |
This file contains hidden or 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
| const radarData = [ | |
| { label: "Acceleration", value: 86 }, | |
| { label: "Agility", value: 58 }, | |
| { label: "Clutch", value: 60 }, | |
| { label: "Speed", value: 85 }, | |
| { label: "Stamina", value: 60 }, | |
| { label: "Strength", value: 90 } | |
| ]; |
This file contains hidden or 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
| const calculateEdgePointFn = (center: number, radius: number) => ( | |
| degree: number, | |
| scale: number = 1 | |
| ): Point => { | |
| const degreeInRadians = degToRadians(degree); | |
| const degreeInRadiansY = degToRadians(svgY(degree)); | |
| return [ | |
| center + Math.cos(degreeInRadians) * radius * scale, | |
| center + Math.sin(degreeInRadiansY) * radius * scale | |
| ]; |
OlderNewer