Skip to content

Instantly share code, notes, and snippets.

public class FizzBuzz {
public static void main(String[] args) {
for (int i = 1; i <= 30; i++) {
int a =(int)Math.pow(0, i % 3);
int b =(int)Math.pow(0, i % 5);
System.out.print("Fizz".repeat(a));
System.out.print("Buzz".repeat(b));
System.out.println(Integer.toString(i).repeat((a ^ 1) * (b ^ 1)));
}
}
apiVersion: v1
name: istio
version: 0.8.0
description: Helm chart for all istio components
keywords:
- istio
- security
- sidecarInjectorWebhook
- mixer
- pilot
❯ minikube start \
--extra-config=controller-manager.cluster-signing-cert-file="/var/lib/localkube/certs/ca.crt" \
--extra-config=controller-manager.cluster-signing-key-file="/var/lib/localkube/certs/ca.key" \
--extra-config=apiserver.admission-control="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" \
--kubernetes-version=v1.10.0 \
--memory=4096
# Create a service account for Helm and grant the cluster admin role.
# It is assumed that helm should be installed with this service account
# (tiller).
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
import org.openqa.selenium.Platform;
import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
driver = {
def capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, BrowserType.FIREFOX);
capabilities.setCapability(CapabilityType.PLATFORM_NAME, Platform.LINUX);
@bufferings
bufferings / doma3-raw-string-literals.md
Last active April 2, 2018 06:42
実際に書いて比べてみようと思って
項目 現状 案1 案2 案3
@bufferings
bufferings / Main.java
Last active March 21, 2018 07:59
JShell で Effectively Final 遊び
import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;
/**
* こんなつぶやきをかけたのでdebugオプションつけて雰囲気見てみたお話。
* https://twitter.com/mike_neck/status/976358507011178496
*
* jshell> var list = List.of("foo", "bar")
* list ==> [foo, bar]
jshell> Var var(){return new Var();}
| created method var(), however, it cannot be referenced until class Var is declared
jshell> class Var{Var1 var = new Var1();}
| created class Var, however, it cannot be referenced until class Var1 is declared
jshell> class Var1{Var var(){return new Var();}}
| created class Var1
jshell> var var = var().var.var();
@bufferings
bufferings / Main.java
Last active March 21, 2018 07:53
Java10で匿名クラス遊び
import java.util.List;
import static java.util.stream.Collectors.toList;
// I've referenced this post:
// https://developer.oracle.com/java/jdk-10-local-variable-type-inference
public class Main {
public static void main(String[] args) {
var products = List.of(
package com.example.demo;
import org.junit.Test;
import java.time.LocalDate;
import java.time.chrono.JapaneseDate;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.time.format.ResolverStyle;
import java.util.Locale;