Skip to content

Instantly share code, notes, and snippets.

View hrmsk66's full-sized avatar

Hiromasa Kakehashi hrmsk66

View GitHub Profile
@hrmsk66
hrmsk66 / create_object_store.md
Created September 14, 2022 03:41
Creating Object Store

Creating a new object store

1. create an object store

curl -i -X POST \
https://api.fastly.com/resources/stores/object \
-H "Fastly-Key: $FASTLY_API_KEY" \
-d '{"name":"test-object-store"}'

*点線はオリジナル画像のリクエスト/レスポンス

sequenceDiagram
    autonumber
    participant Client
    participant Edge/Deliver
    participant Edge/Fetch
    participant Shield/Deliver
    participant Shield/Fetch
@hrmsk66
hrmsk66 / sequence.md
Last active August 28, 2022 06:13
Restarting with ImageOpto

*点線はオリジナル画像のリクエスト/レスポンス

sequenceDiagram
    autonumber
    participant Client
    participant Edge/Deliver
    participant Edge/Fetch
    participant Shield/Deliver
    participant Shield/Fetch
import {
  decodeWebSocketEvents,
  encodeWebSocketEvents,
  WebSocketContext,
  WebSocketMessageFormat,
} from "@fanoutio/grip";
import { Publisher } from "@fastly/grip-compute-js";
import { GRIP_URL } from "./env";

はじめに

Compute@Edge の開発の流れやツールを紹介するためのハンズオンワークショップです。

ワークショップへ参加する為には Fastly CLI のインストールと JavaScript の開発環境が必要です。 まだ準備ができていない場合は、こちらの記事を参考にご対応ください。 https://zenn.dev/hrmsk66/articles/74e2e890726e99

Fastly CLI のバージョンの違いによるトラブルを避けるために fastly update コマンドを実行しておいてください。

@hrmsk66
hrmsk66 / backend_definition_via_loop.md
Last active March 26, 2022 04:50
Create backend definitions from a list of maps

Create backend definitions from a list of maps

variables.tf

variable "backends" {
    type = list(map(string))
}
@hrmsk66
hrmsk66 / conreq.go
Last active September 9, 2019 05:59
Generating concurrent HTTP/HTTPS requests
package main
import (
"flag"
"fmt"
"net/http"
"strconv"
"time"
)
@hrmsk66
hrmsk66 / bulma-form.html
Created May 13, 2018 06:27
Bulma Simple Form
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello Bulma!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.0.7/js/all.js"></script>
</head>
<body>
@hrmsk66
hrmsk66 / serviceTemplate.xml
Created May 9, 2018 06:35
Tags for NSO service templates
<config-template xmlns="http://tail-f.com/ns/config/1.0"
servicepoint="tagtest">
<devices xmlns="http://tail-f.com/ns/ncs">
<device>
<name>{device}</name>
<config>
<nodes xmlns="http://example.com/device">
<?foreach {node}?>
<node tags="merge">
<id>{id}</id>
@hrmsk66
hrmsk66 / customInput.js
Created May 9, 2018 02:11
Vue Custom Input
Vue.component('coupon', {
props: ['value'],
template: `
<input type="text" class="input" :value="value" @input="updateCode($event.target.value)" ref="input">
`,
data() {