Skip to content

Instantly share code, notes, and snippets.

View mahata's full-sized avatar
💭
On parenting...

Yasunori MAHATA mahata

💭
On parenting...
View GitHub Profile
spring:
datasource:
url: jdbc:postgresql://${POSTGRES_HOST:localhost}:${POSTGRES_PORT:54321}/${POSTGRES_DB:spring-db}
username: ${POSTGRES_USER:spring-user}
password: ${POSTGRES_PASSWORD:password}
version: "3.9"
services:
db:
image: postgres:15.4-alpine3.18
container_name: spring-db
ports:
- "54321:5432"
environment:
POSTGRES_USER: "spring-user"
@mahata
mahata / schedule.md
Last active December 8, 2023 14:50
Spring Boot 速習講座のスケジュール
@mahata
mahata / rules.v4
Created April 11, 2023 09:25
iptables conf file for Oracle Cloud
# 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]
#!/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 ############ "
#!/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
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
// 本章で作った 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
@mahata
mahata / Main.java
Created January 1, 2019 14:35
How remove() works 2
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");