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
S3AssetCopyFunction: | |
Type: AWS::Lambda::Function | |
Properties: | |
FunctionName: S3AssetCopy | |
Handler: index.handler | |
Role: !GetAtt LambdaExecutionRole.Arn | |
MemorySize: 4096 | |
Runtime: python3.12 | |
Timeout: 30 | |
Code: |
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 { Stack } from "aws-cdk-lib"; | |
import { BehaviorOptions, Function, FunctionCode, FunctionEventType } from "aws-cdk-lib/aws-cloudfront"; | |
import { HttpOrigin } from "aws-cdk-lib/aws-cloudfront-origins"; | |
import { join } from "path"; | |
export const getRedirectBehavior = (scope: Stack, id: string, location: string): BehaviorOptions => { | |
const redirectFilePath = join(__dirname, 'redirect-function.js'); | |
const redirectFunctionCode = FunctionCode.fromFile({ filePath: redirectFilePath }); | |
const redirectFunction = new Function(scope, `${id}-default-redirect-function`, { | |
code: redirectFunctionCode |
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
const withDelay = async <T,>(delay = 0, callback: () => T) => { | |
await new Promise(resolve => setTimeout(resolve, delay)); | |
return callback(); | |
} |
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
#!/bin/bash | |
sudo yum update -y | |
sudo yum install -y git nodejs | |
git -v # Check git version | |
node -v # Check node version | |
npm -v # Check npm version | |
npm i -g pm2 | |
export HOME=/home/ec2-user | |
pm2 -v # Check pm2 version |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: | | |
Gitlab mirroring to AWS CodeCommit | |
Parameters: | |
CreateCodeCommitRepository: | |
Description: Would you like to create a new CodeCommit repository? | |
Type: String | |
Default: 'create-new' |
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 { LitElement, html, customElement, property } from "lit-element"; | |
import style from "./Style"; | |
@customElement('my-component') | |
class MyComponent extends LitElement { | |
static styles = style; | |
render() { | |
return html`<p>Styled component</p>`; |
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
### Task 2 | |
png(filename = "HistogramExams.png") | |
hist( | |
exam, | |
# breaks=seq(from=1.0, to=5.0, by=0.1), | |
breaks = c(0, 0.3, 0.7, 1.0, 1.3, 1.7, 2.0, 2.3, 2.7, 3.0, 3.3, 3.7, 4.0, 4.3, 4.7, 5.0), | |
xlim = c(0, 5), | |
freq = TRUE, | |
xlab="Grades", |
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
### Task 10 | |
iterative_sum <- function (n) { | |
sum <- 0 | |
for (i in 1: n) { | |
sum = sum + i | |
} | |
return(sum) | |
} | |
recursive_sum <- function (n) { |
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 { css } from 'lit-element'; //nie zapomnij o zaimportowaniu dyrektywy | |
import style from './app-layout.scss' | |
class AppLayout extends LitElement { | |
static get styles() { | |
return [ | |
css([style]), | |
]; | |
} |
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: { | |
rules: [ | |
{ | |
test: /\.scss$/, | |
use: [ | |
'css-loader', | |
{ | |
loader: 'sass-loader', | |
options: { includePaths: ['./node_modules'] } //prawdopodobnie potrzebujesz tego, jeśli korzystasz z dalszych bibliotek, jak np. Material Design | |
} |
NewerOlder