key | value |
---|---|
更新 | 2021-08-23 |
作者 | @zaru |
バージョン | 2021.8 |
URL | http://basicinc.jp/ |
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 | |
# サイズを指定する (1MB = 1048576バイト) | |
FILE_SIZE=1048576 | |
# ディレクトリとファイルを作成する | |
for i in {1..10}; do | |
for j in {1..10}; do | |
mkdir -p ./xxx${i}/yyy${j} | |
done |
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 { describe, expect, mock, test } from "bun:test"; | |
import { sampleAction } from "@/app/sampleAction"; | |
describe("sampleAction", () => { | |
test("正常:返り値が正しく返ってくる", async () => { | |
const result = await sampleAction(true); | |
expect(result).toEqual({ sampleAction: "sampleAction" }); | |
}); | |
test("異常:エラーページにリダイレクトされる", async () => { |
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 { | |
type NextFetchEvent, | |
type NextRequest, | |
NextResponse, | |
} from "next/server"; | |
async function heavyTask() { | |
console.log("start heavyTask.", new Date()); | |
// await fetch("http://0.0.0.0:9999/heavy.php", { cache: "no-store" }); | |
console.log("done heavyTask.", new Date()); |
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
{ | |
:inline_code_size=>14144068, | |
:outlined_code_size=>14143076, | |
:freed_page_count=>0, | |
:freed_code_size=>0, | |
:live_page_count=>1727, | |
:code_gc_count=>0, | |
:code_region_size=>28291072, | |
:yjit_alloc_size=>43781717, | |
:all_stats=>true, |
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
<script setup lang="ts"> | |
interface ISampleProps { | |
foo: { | |
bar: string | |
} | |
} | |
const defaultValue: ISampleProps = { | |
foo: { | |
bar: 'bar' | |
} |
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
class Batches | |
BATCH_SIZE = 2 | |
def initialize | |
@data = (1..10).to_a | |
end | |
def find_each | |
if block_given? | |
find_in_batches do |records| |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style type="text/css"> | |
* { |
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
<?php | |
sleep(1); |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style type="text/css"> | |
.todo-done { |
NewerOlder