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
FROM golang:1.22.4-alpine3.19 as builder | |
WORKDIR /app | |
COPY go.mod go.sum ./ | |
RUN go mod download | |
COPY . . | |
RUN CGO_ENABLED=0 GOOS=linux go build -v |
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
// Initialize clock and let the page load naturally. | |
await page.clock.install({ time: new Date('2024-02-02T08:00:00') }); | |
await page.goto('http://localhost:3333'); | |
// Pretend that the user closed the laptop lid and opened it again at 10am, | |
// Pause the time once reached that point. | |
await page.clock.pauseAt(new Date('2024-02-02T10:00:00')); | |
// Assert the page state. | |
await expect(page.getByTestId('current-time')).toHaveText('2/2/2024, 10:00:00 AM'); |
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
// ติดตั้ง library | |
$npm install -g @typespec/compiler | |
// สร้าง project | |
$tsp init | |
TypeSpec compiler v0.57.0 | |
? Please select a template › - Use arrow-keys. Return to submit. | |
❯ Empty project min compiler ver: 0.57.0 - Create an empty project. | |
Generic REST API min compiler ver: 0.57.0 |
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
$dotnet --list-sdks | |
6.0.406 [/usr/local/share/dotnet/sdk] | |
6.0.410 [/usr/local/share/dotnet/sdk] | |
6.0.412 [/usr/local/share/dotnet/sdk] | |
7.0.200 [/usr/local/share/dotnet/sdk] | |
7.0.201 [/usr/local/share/dotnet/sdk] | |
7.0.304 [/usr/local/share/dotnet/sdk] | |
7.0.306 [/usr/local/share/dotnet/sdk] | |
8.0.100-preview.3.23178.7 [/usr/local/share/dotnet/sdk] | |
8.0.100-preview.5.23303.2 [/usr/local/share/dotnet/sdk] |
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
// HTML | |
<div class="demo"> | |
<a href="/windows/new" ,="" target="_blank">Click Here</a> | |
</div> | |
// Test with cypress | |
describe("Demo spec", () => { | |
it("check data after click link", () => { | |
// Arrange | |
cy.visit("your target"); |
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
$dotnet --version | |
9.0.100-preview.4.24267.66 | |
$dotnet new list | |
These templates matched your input: | |
Template Name Short Name Language Tags | |
-------------------------------------------- -------------------------- ---------- -------------------------------- | |
API Controller apicontroller [C#] Web/ASP.NET | |
ASP.NET Core Web API (native AOT) webapiaot [C#] Web/Web API/API/Service |
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
services: | |
alloy: | |
image: grafana/alloy:latest | |
command: run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy | |
ports: | |
- 12345:12345 | |
volumes: | |
- ./config.alloy:/etc/alloy/config.alloy |
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
$java -version | |
openjdk version "23-ea" 2024-09-17 | |
OpenJDK Runtime Environment (build 23-ea+25-2094) | |
OpenJDK 64-Bit Server VM (build 23-ea+25-2094, mixed mode, sharing) | |
$javadoc -d doc Demo.java | |
Loading source file Demo.java... | |
Constructing Javadoc information... | |
Building index for all the packages and classes... | |
Standard Doclet version 23-ea+25-2094 |
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
$./mvnw clean package | |
$java -jar target demo.jar | |
Started Demo33Application in 1.49 seconds (process running for 2.434) | |
Memory footprint at startup: 40-70 MB | |
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
$docker image ls --digests | |
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE | |
nginx 1.25.5 sha256:a484819eb60211f5299034ac80f6a681b06f89e65866ce91f356ed7c72af059c 8dd77ef2d82e 3 weeks ago 193MB | |
nginx latest sha256:a484819eb60211f5299034ac80f6a681b06f89e65866ce91f356ed7c72af059c 8dd77ef2d82e 3 weeks ago 193MB | |
$docker image inspect nginx:1.25.5 --format '{{.RepoDigests}}' | |
[nginx@sha256:a484819eb60211f5299034ac80f6a681b06f89e65866ce91f356ed7c72af059c] | |
NewerOlder