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
spring: | |
datasource: | |
url: jdbc:postgresql://${POSTGRES_HOST:localhost}:${POSTGRES_PORT:54321}/${POSTGRES_DB:spring-db} | |
username: ${POSTGRES_USER:spring-user} | |
password: ${POSTGRES_PASSWORD:password} |
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
version: "3.9" | |
services: | |
db: | |
image: postgres:15.4-alpine3.18 | |
container_name: spring-db | |
ports: | |
- "54321:5432" | |
environment: | |
POSTGRES_USER: "spring-user" |
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
# CLOUD_IMG: This file was created/modified by the Cloud Image build process | |
# iptables configuration for Oracle Cloud Infrastructure | |
# See the Oracle-Provided Images section in the Oracle Cloud Infrastructure | |
# documentation for security impact of modifying or removing these rule | |
*filter | |
:INPUT ACCEPT [0:0] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [463:49013] |
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/sh -xe | |
# Source: http://kubernetes.io/docs/getting-started-guides/kubeadm | |
set -e | |
source /etc/lsb-release | |
if [ "$DISTRIB_RELEASE" != "20.04" ]; then | |
echo "################################# " | |
echo "############ WARNING ############ " |
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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import textwrap | |
import urllib.request | |
import json | |
import random | |
from dataclasses import dataclass | |
from typing import List |
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
function *createPrimeGenerator() { | |
const primes = new Set<number>() | |
let current = 2 | |
while (true) { | |
while (true) { | |
let isPrime = true | |
for (const prime of primes) { | |
if (current % prime === 0) { | |
isPrime = false |
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
// 本章で作った cat コマンドを改造して、コマンドライン引数でファイル名が渡されなかったら標準入力を読むようにしなさい。 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
static void do_cat(int fd, const char *s); |
["A", "C"]
^
cursor
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 java.util.*; | |
public class Main { | |
public static void main(String[] args) throws Exception { | |
ArrayList<String> list = new ArrayList<>(); | |
list.add("A"); | |
list.add("B"); | |
list.add("C"); | |
list.add("D"); | |
list.add("E"); |
NewerOlder